arrow
arrow
arrow
Which SQL operator is used to filter rows by checking whether a value matches any value in a specified list?
Question

Which SQL operator is used to filter rows by checking whether a value matches any value in a specified list?

A.

BETWEEN

B.

IN

C.

LIKE

D.

EXISTS

E.

DISTINCT

Correct option is B

The IN operator in SQL is used to check whether a value matches any value present in a specified list. It simplifies queries that would otherwise require multiple OR conditions.

For example:

SELECT * FROM Students
WHERE Course_ID IN (101, 102, 103);

This query returns rows where Course_ID is either 101, 102, or 103.

Therefore, the correct answer is IN.

Important Key Points:

  1. The IN operator is used to match values from a specified list.
  2. It reduces the need for multiple OR conditions in SQL queries.
  3. The operator can be used with both numeric and string values.
  4. IN is commonly used in the WHERE clause for filtering records.

Knowledge Booster:

  1. (a) BETWEEN: Incorrect because BETWEEN is used to filter values within a specified range.
  2. (c) LIKE: Incorrect because LIKE is used for pattern matching with wildcard characters.
  3. (d) EXISTS: Incorrect because EXISTS checks whether a subquery returns any rows.
  4. (e) DISTINCT: Incorrect because DISTINCT is used to remove duplicate rows from query results.

Free Tests

Free
Must Attempt

SBI Clerk Prelims Full Mock Test-01

languageIcon English
  • pdpQsnIcon100 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Prelims 2026 : Reasoning Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Prelims 2026 : Quantitative Aptitude Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
test-prime-package

Access ‘IBPS SO IT Officer’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
446k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow