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 / vijendra singh shakya

For Employee table plz use the following Query...

select [empid] from employee group by [empid]
having count(empid)>1

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a mutating table error and how can you get around it?

548


Is it ok to shrink transaction log?

527


What is a View ? Can we insert, Update and delete a view?

637


How to create user defined functions with parameters?

650


What is ddl command?

540






How to select true false based on column value in sql server?

516


Should you normalize audio?

536


What are the parts of a function?

533


What do you understand by triggers?

536


What new changes are being made in SQL Server?

582


Can you edit the .rdl code associated with a linked report?

109


Do you know clustered and non-clustered index?

535


When you use @@error and try-catch?

589


Can an entity have two primary keys?

539


How are the unique and primary key constraints different?

575