Computer Science
Consider the following table namely Employee :
Employee_id | Name | Salary |
---|---|---|
1001 | Misha | 6000 |
1009 | Khushi | 4500 |
1018 | Japneet | 7000 |
Which of the names will not be displayed by the below given query ?
SELECT name FROM employee WHERE employee_id > 1009 ;
- Misha, Khushi
- Khushi, Japneet
- Japneet
- Misha, Japneet
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.
Related Questions
…………… clause of the following query must be added with keyword …………… to display the fields given in the select list as per a given condition.
SELECT ID, name, dept name, salary * 1.1 WHERE instructor = 1005 ;
- where, having
- select, from
- where, from
- where, select
Which of the following queries contains an error?
- Select * from emp where empid = 10003;
- Select empid from emp where empid = 10006;
- Select empid from emp;
- Select empid where empid = 1009 and lastname = 'GUPTA';
Which operator performs pattern matching ?
- BETWEEN operator
- LIKE operator
- EXISTS operator
- None of these
Consider the following query
SELECT name FROM class WHERE subject LIKE ' ............... Computer Science' ;