Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain different types of collation sensitivity?

946


Comment,Datatypes are unlimited

2036


Write SQL queries on Self Join and Inner Join.

1093


What is the difference between clustered index and primary key?

885


Does index slows down insert statements?

955


What is the difference between row_number and dense_rank?

847


How do I start and stop sql server?

984


Can foreign key be duplicate?

1018


What is a matrix in ssrs?

143


How to compare the top two records using sql?

1300


What does it mean if @@cursor_row returns a negative number?

962


What are the advantages of sql stored procedure?

1035


when would you go for denormalization? : Sql server database administration

830


How to get a list of columns in a view using "sys.columns" in ms sql server?

949


How do I find query history in sql server?

896