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...

employee table has employee id
-----------
empid
----------------
1
2
3
3
3
4
5
5
5
6
6
6
7
here the values r repeated two times.how to select the
repeated values only.i.e 3,5,6 should alone come.

Answer Posted / meher

If you want to get the count for the duplicates then, the
query will be:

SELECT EMPID,COUNT(EMPID) FROM EMPLOYEE GROUP BY EMPID
HAVING COUNT(EMPID)>1

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication

1048


what is denormalization and when would you go for it? : Sql server database administration

1201


What is normalization and its types?

1040


What is the difference between dbcc indexdefrag and dbcc reindex?

987


How to resolve the orphan use problem? : sql server security

1019


Define primary key?

1142


How do you rename a table in sql server?

1032


A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?

964


How to update muliple row in single query?

1063


How to start and end transact-sql statements?

1031


How will you go about resolving deadlocks?

973


What does executeupdate return?

981


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

874


What samples and sample databases are provided by microsoft?

1042


 Explain what is sql override for a source taLle in a mapping?

1013