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 / rajesh kumar
select empid from employee where empid in (select empid
from employee group by empid having count(empid) > 1)
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is the use of floor function in sql server?
What are the benefits of filtered indexes?
What is the sql case statement used for? Explain with an example?
Define Business Edition in SQL Azure?
What is database replication?
What happens if null values are involved in comparison operations?
Explain what is lock escalation?
What is the recovery model?
How to call a function from a stored procedure in SQL Server ?
What is view in sql?
How to drop an existing user defined function in ms sql server?
What command do we use to rename a database?
What is change data capture (cdc) feature?
explain declarative management framework (dmf) in sql server 2008?
What are the encryption mechanisms in sql server?