Skip to content

Instantly share code, notes, and snippets.

@pedrotnascimento
Last active May 8, 2017 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrotnascimento/0c815cb0e065e9cf64c3498dae69ff0c to your computer and use it in GitHub Desktop.
Save pedrotnascimento/0c815cb0e065e9cf64c3498dae69ff0c to your computer and use it in GitHub Desktop.
Coleção de códigos de SQL
-- checking intregrity of foreign key restriction
select f.foreign_key
from foreignTable f left join primaryTable p
on p.primary_key = f.foreign_key
where p is null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment