I have a table tbl1 which has a column tbl_names. This column contains the name of some other tables. Now I want to write a query in th
You can use prepared statements
SET @a = (select tbl_names from tbl1); SET @x := CONCAT('SELECT * FROM ', @a); Prepare stmt FROM @x; Execute stmt; DEALLOCATE PREPARE stmt;
PREPARE Syntax
Cheers.