rodrigosantosbr

[SQLite] Show duplicate columns

Jan 8th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.14 KB | None | 0 0
  1. SELECT cnpj, COUNT(*) c FROM pessoajuridica GROUP BY cnpj HAVING c > 1;
  2.  
  3. SELECT cpf, COUNT(*) c FROM pessoafisica GROUP BY cpf HAVING c > 1;
Advertisement
Add Comment
Please, Sign In to add comment