Show MySQL tables starting with prefix?
To list all tables with some prefix, "any number of symbols" wildcard (%
), should be used.
_
is also a wildcard, representing any single symbol, and therefore it should be escaped.
Therefore, given your prefix is someprefix_
, then
SHOW TABLES LIKE 'someprefix\_%'
would work
SHOW [FULL] TABLES [{FROM | IN} db_name]
[LIKE 'pattern' | WHERE expr]