How do you get a table that starts with an underscore?
This works for getting all tables that start with a capital T:
SHOW TABLES LIKE 'T%'
This doesn't work (returns all tables):
SHOW TABLES LIKE '_%'
How do you get a table that starts with an underscore?
This works for getting all tables that start with a capital T:
SHOW TABLES LIKE 'T%'
This doesn't work (returns all tables):
SHOW TABLES LIKE '_%'
As the underscore is a wildcard, you need to escape it to match the underscore itself:
SHOW TABLES LIKE '\_%'
From MySQL.com - 3.3.4.7 Pattern Matching:
SQL pattern matching enables you to use “_” to match any single character and “%” to match an arbitrary number of characters (including zero characters)