Computer Science

Consider the following table namely Employee :

Employee_idNameSalary
1001Misha6000
1009Khushi4500
1018Japneet7000

Which of the names will not be displayed by the below given query ?

SELECT name FROM employee WHERE employee_id > 1009 ;
  1. Misha, Khushi
  2. Khushi, Japneet
  3. Japneet
  4. Misha, Japneet

SQL Queries

1 Like

Answer

Misha, Khushi

Reason — The query SELECT name FROM employee WHERE employee_id > 1009; retrieves the names of employees whose employee_id is greater than 1009. Japneet has an employee_id of 1018, which is greater than 1009, so Japneet will be displayed. But the question asks for the names which will not be displayed by the query. Hence, the correct answer will be Misha, Khushi, as they have employee_id ≤ 1009.

Answered By

1 Like


Related Questions