I want to change the dynamic name of a table in sql query. For example, I have the following stored procedure:
CREATE PROCEDURE NewProc(IN tableName varchar(64),IN message text)
BEGIN
INSERT INTO tableName VALUES (message);
END;
I need to change tableName at runtime, can I do this or not? Thank.
source
share