2014-03-30 38 views

回答

0

取決於MySQL版本,您正在使用,您可以使用類似:

SET @tableName = 'Customer'; 
SET @s = CONCAT('SELECT * FROM ', @tableName); 
PREPARE stmt FROM @s; 
EXECUTE stmt; 
DEALLOCATE PREPARE stmt;