-
How to find just the dups
I'm new to sql.. and I have not been able to find in the books I have the answer to this question.
How do you code a select statement to pull out just the duplicate rows, based on just one field, which is not the primary key.
-
I hope this help
SELECT nombre_cliente,count(*)
FROM clientes
GROUP BY nombre_cliente
HAVING COUNT(*)>1
-
This will display rows which are having duplicates
select distinct * from emp a
where a.rowid < (select max(b.rowid) from emp b where b.empno = a.empno)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|