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
How can sql injection be stopped? : sql server security
How would you choose between a clustered and a non-clustered index?
what are the three command line utilities and what are their primary functions?
How to count groups returned with the group by clause in ms sql server?
How ssrs maintain security?
How to execute multiple stored procedures at one time in sql server?
What are the types of sql server?
Differentiate between a having clause and a where clause.
How do database indexes work?
How to stop log file growing too big?
What is the difference between deallocate cursor and close cursor?
How to connect ms access to sql servers through odbc?
Where are sql server user names and passwords stored in sql server?
What different steps will a sql server developer take to secure sql server?
What will be query used to get the list of triggers in a database?