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

Explain how many types of relationship?

976


Where do you find the default Index fill factor and how to change it?

1017


What types of replication are supported in sql server?

999


How to define output parameters in stored procedures?

961


Explain what are the database objects? : SQL Server Architecture

1006


What are the different types of cursor?

1042


Why normalization is used?

967


What are ddl triggers and types of ddl trigger?

979


How to get a list of columns using the "sp_help" stored procedure in ms sql server?

986


How many types of triggers are there?

1004


Does index speed up select statements?

978


Explain indexed views and partitioned view with their syntax.

1079


how many triggers you can have on a table? : Sql server database administration

908


Why is normalisation important?

903


Can we shrink data file in sql server?

1000