Select data from "show tables" MySQL query
Is it possible to select from show tables
in MySQL?
SELECT * FROM (SHOW TABLES) AS `my_tables`
Something along these lines, though the above does not work (on 5.0.51a, at least).
Solution 1:
I think you want SELECT * FROM INFORMATION_SCHEMA.TABLES
See http://dev.mysql.com/doc/refman/5.0/en/tables-table.html
Solution 2:
Not that I know of, unless you select from INFORMATION_SCHEMA
, as others have mentioned.
However, the SHOW
command is pretty flexible,
E.g.:
SHOW tables like '%s%'