Skip to content

Instantly share code, notes, and snippets.

@cornelisonc
Created May 19, 2015 17:36
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 cornelisonc/c6c716889b6d0708fd81 to your computer and use it in GitHub Desktop.
Save cornelisonc/c6c716889b6d0708fd81 to your computer and use it in GitHub Desktop.
MySQL show table names like or not like prefix
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'databasename'
AND table_name LIKE 'prefix%';
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'databasename'
AND table_name NOT LIKE 'prefix%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment