I have a mysql procedure that inserts a row to a table. Is it possible to pass the name of the table as a parameter?
I tried and got an unknown table exception.
EDIT:
my procedure is called from insaid a trriger:
CREATE PROCEDURE `blabla`(tableName VARCHAR(255), var1 VARCHAR(255), var2 VARCHAR(255), var3 VARCHAR(255))
BEGIN
INSERT INTO tableName
SET
var1 = var1,
var2= var2,
var3= var3;
END
the error: ERROR 1146: 1146: Table 'xxx_xx_admin.tableName' doesn't exist