i have for example:
tableAaa:
id | titleSSS
1 | sfdf
2 | sdfs
tableBbb:
id | titleUUU
1 | sfdf
2 | sdfs
tableCcc:
id | titleIII
1 | sfdf
2 | sdfs
etc, for example * 10.
Is possible make something like:
SELECT title* FROM table*
If yes, how?
EDIT: i dont want use UNION and do select from each table… These table is ~100. I would like make regular expression.
You can do it, but you’ll have to list all column and table names manually:
Note that you must use
UNION ALLinstead ofUNIONor otherwise you won’t get duplicate rows in the output. Read more here: http://dev.mysql.com/doc/refman/5.0/en/union.html