|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
selecting rows with duplicated values [RESOLVED]
Hi,
I'm trying to select all the Employees who's Employee ID already exist (duplicated Employee IDs) from my Employees table. I need help with the SQL syntax. Anyone? Thanx! Last edited by shafan : July 31st, 2003 at 08:17 AM. |
|
#2
|
|||
|
|||
|
Code:
select * from employees where id in (select id from employees group by id having count(id) > 1) |
|
#3
|
||||
|
||||
|
works like a dream!
thanx |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > selecting rows with duplicated values |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|