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). 回答1: I think you want SELECT * FROM INFORMATION_SCHEMA.TABLES See http://dev.mysql.com/doc/refman/5.0/en/tables-table.html 回答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%' 回答3: To count: SELECT