Which of the following SQL query is correct for selecting the name of staffs from 'staffinfo' table where salary is 10,000 or 25,000?
A. SELECT name FROM staffinfo WHERE salary BETWEEN 10000 AND 25000;
B. SELECT name FROM staffinfo WHERE salary IN (10000, 25000);
C. Both A and B
D. None of the above
Answer: Option B
Solution (By Examveda Team)
SELECT name FROM staffinfo WHERE salary IN (10000, 25000);This query correctly selects the names of staff members whose salary is either 10,000 or 25,000. The correct answer is Option B because it selects the names of staffs with salaries of 10,000 or 25,000, as required by the question.

i think both a&b are true
I marked a wrong answer, but now I know the difference: between will list the values between 10000 and 25000, example: 10000, 10001, 10002, 10003, ... , 24998, 24999, 25000.
Meanwhile the in clause just select these two values, example: 10000, 25000 -> works like a "or"
only those records fetch which specific salary arguments provided in statement.
it matches the list and where we have two items in list. so it is true