U kunt voorbereide verklaringen gebruiken
SET @a = (select tbl_names from tbl1);
SET @x := CONCAT('SELECT * FROM ', @a);
Prepare stmt FROM @x;
Execute stmt;
DEALLOCATE PREPARE stmt;
PREPARE-syntaxis
Proost.
U kunt voorbereide verklaringen gebruiken
SET @a = (select tbl_names from tbl1);
SET @x := CONCAT('SELECT * FROM ', @a);
Prepare stmt FROM @x;
Execute stmt;
DEALLOCATE PREPARE stmt;
PREPARE-syntaxis
Proost.