HOW TO FIND THE EMPLOYEE DETAILS WHO ARE GETTING SAME SALARY
IN EMP TABLE
Answer Posted / asit
Can someone answer to this. on below query where i want to find same salary in employee table,
SELECT * FROM EMPLOYEE WHERE (SAL IN (SELECT sal FROM empLOYEE GROUP BY sal HAVING COUNT(sal) > 1))
i am getting correct output.
but if i change it to 'COUNT(SAL)>=1' then it prints all the lines from the table.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is natural join and equi join same?
What is set nocount on and what is set nocount off?
What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture
What is mean by dml?
What are the pre-defined functions in the sql server?
What is difference between unique and primary key?
If the job running very slow what is the action you do
What are the types of stored procedures in an sql server?
What is statement level trigger?
Does a full backup include transaction log?
Tell about MOM Tool(Microsoft Operator Manager)?
What are joins in sql and what are the different types of joins?
what is hash nonclustered index
What does the update command do?
Explain the difference between functions and stored procedures in sql server?