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
Explain different types of collation sensitivity?
Comment,Datatypes are unlimited
Write SQL queries on Self Join and Inner Join.
What is the difference between clustered index and primary key?
Does index slows down insert statements?
What is the difference between row_number and dense_rank?
How do I start and stop sql server?
Can foreign key be duplicate?
What is a matrix in ssrs?
How to compare the top two records using sql?
What does it mean if @@cursor_row returns a negative number?
What are the advantages of sql stored procedure?
when would you go for denormalization? : Sql server database administration
How to get a list of columns in a view using "sys.columns" in ms sql server?
How do I find query history in sql server?