INTERVIEW QUESTIONS
DATABASE
SQL SERVER
DETAILS
Question: Write sql query for retrieving employee names from employee table who are having salary greater than 5000 without using where clause
Answer: Select Ename from EMP where Sal > 5000
Is the correct query. Because we don't have to access the number of the records. The above query will show all the employees' name who have salary more then 5000.
No need to make group by and having caluse.
|