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


Please Help Members By Posting Answers For Below Questions

What stored procedure would you use to view lock information?

733


Explain the disadvantages of cursors?

763


What is a document index?

770


What is the process of normalising?

758


You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?

113


How to see existing views in ms sql server?

727


What is the syntax for encrypting a column in SQL Server?

768


What is database isolation in sql server? : sql server database administration

782


What is named query? : sql server analysis services, ssas

702


what type of index will get created after executing the above statement? : Sql server database administration

726


What happens if the update subquery returns multiple rows in ms sql server?

794


What is self contained multi valued query?

748


How raid can influence database performance?

754


How do I get to sql server configuration manager?

697


What is Command line parameters in PLSQL.?

768