registros duplicados sql

Page 1

Arquivo: /home/magno/consulta_registros_duplicados.txt

Página 1 de 1

SELECT emp_cnpj, count(*) FROM empresa WHERE emp_cnpj ” GROUP BY emp_cnpj HAVING COUNT(*) > 1 LIMIT = 1; ============== SELECT emp_cnpj, count(*) FROM empresa WHERE emp_cnpj <> '' GROUP BY emp_cnpj HAVING COUNT(*) > 1 ============== select codigo, count(codigo) from tabela group by codigo having count(codigo)>1


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.