""Sameer""
Old Hand
Points: 302
More actions
December 11, 2008 at 12:03 am
#96739
Hi,
Require a sql query that will retrieve duplicate values that are present in database columns but i dodnt know which values are that..
i have created a suppose a employee table but didnt created any column with primary key constraint on it or any unique key...
Suresh B.
SSC-Insane
Points: 22986
December 11, 2008 at 2:02 am
#910885
Require a sql query that will retrieve duplicate values that are present in database columns
Try somethinig like this:
SELECT EmpName, count(EmpName)
FROM tblEmp
GROUP BY EmpName
HAVING count(EmpName) >= 2
December 11, 2008 at 3:10 am
#910913
suresh thanks for ur reply it do works........
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply