Table name in another table

admin

Administrator
Staff member
Well, it could be quite crazy, but it\'s useful if U are doing dynamic stuff.
It\'s not possible for mysql to sub-select,
but it\'s even not possible to sub-select the \"from\" field.
For example:
SELECT name from (select tables from table_list)
Well, with php you could do a WHILE cycle,
but it\'s long.

What I\'m looking for is an SQL query that
gets some table names from a table, and then perform a query on each table of those fetched by the first select.

Funny ?
Try to code it :-))
 
Back
Top