71
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?
Answer & Solution
Answer: Option
B
Solution:
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.
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.