Skip to content

Instantly share code, notes, and snippets.

@birchestx
Last active August 29, 2015 14:05
Show Gist options
  • Save birchestx/f5b906adf5d47fda3323 to your computer and use it in GitHub Desktop.
Save birchestx/f5b906adf5d47fda3323 to your computer and use it in GitHub Desktop.
find where database consistencies join table
SELECT c.ID, c.user_id
FROM carriers c
LEFT JOIN users u ON c.user_id = u.ID
WHERE u.ID IS NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment