SELECT statement with wildcards in table name

What is the way to write a SELECT statement to retrieve data from several tables with the same name pattern. I’d like to select data from these tables: table_2012, table_2013, table_2014… I only want the tables that have the prefix (e.g. table_) and exactly the four characters for the year. I don’t want tables that have a different pattern than the year. Is this doable in MySQL? What is the

SELECT * FROM TABLE LIKE table_% WHERE …

No it isn’t. The table name is the one value that must be hard coded in every SQL command (other than the SQL keywords of course).

Felgal is right…

You should use multiple queries joined on a UNION statement…

Sent from my GT-I5800