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.
Printable View
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.
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)