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

Using the customer, and order table in northwind database, please write a query to produce xml?

1119


When to use null data driven subscription?

213


How do you rebuild an identity column?

997


What is a full text index?

970


What are types of storage modes? : sql server analysis services, ssas

1087


What is the difference between DATETIME2 and DATETIME?

1131


What is a cursor, index in sql?

1130


Can you use order by when defining a view?

1022


What is sql service broker?

1026


How can sql injection be stopped? : sql server security

1105


What is Sqlpaging in SqlServer 2005 ?

1115


What is thr feature of change data capture?

1038


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

1043


What is RAID? What are the different types of RAID configurations?

1184


Explain in brief how sql server enhances scalability of the database system?

1028