Is this supposed to work in MySQL?
select * from (show table status like '%fubar%') as t1;
or even
select name, rows from (show table status like '%fubar%') as t1 where rows>0;
This is the error I get:
ERROR 1064 (42000): You have an error in the SQL syntax; check the manual that matches your version of MySQL server for the correct syntax to use next to the status of the show table, for example "% fubar%"), like t1 'on line 1
Can show table foo like '%something%'
or show tables like '%something%'
not be used in the subquery this way? How else could you choose from all tables matching a specific template?
Morterwald
source share