Skip to content

Instantly share code, notes, and snippets.

@Eidansoft
Last active May 17, 2018 12:20
Show Gist options
  • Save Eidansoft/65a514beb0cb76f8548db8146599a87d to your computer and use it in GitHub Desktop.
Save Eidansoft/65a514beb0cb76f8548db8146599a87d to your computer and use it in GitHub Desktop.
Generic SQLs to easily solve some issues
-- Look for a table filtering by the name (MySql)
-- If you already has the database selected
SHOW TABLES LIKE '%_name'
-- If the database is not selected
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME like '%_name'
and TABLE_SCHEMA = 'your_db_name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment