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
What is the difference between delete and truncate statements?
Do you know what is user defined datatypes and when you should go for them?
What is difference between createstatement and preparedstatement?
What is the default fill factor value?
Where are SQL server users names and passwords are stored in sql server?
Which trace flags are enabled in sql server?
What is the difference between resultset and resultsetmetadata?
How to delete duplicate rows in sql server?
Can group functions be used in the order by clause in ms sql server?
Define cursor locking
What are the different index configurations a table can have?
Which feature in sql server 2008 has surprised you? You can name just one. : sql server database administration
what information is maintained within the msdb database? : Sql server administration
Write a SQL query to make a column as unique?
Can we insert data into a view?