You are on page 1of 1

DELIMITER // CREATE PROCEDURE createLogTable(tblName VARCHAR(255)) BEGIN SET @tableName = tblName; SET @q = CONCAT(' CREATE TABLE IF NOT EXISTS

`' , @tableName, '` ( `id` INT(11)) '); PREPARE stmt FROM @q; EXECUTE stmt; DEALLOCATE PREPARE stmt; -- and you're done. Table is created. -- process it here if you like (INSERT etc) END // DELIMITER ;

You might also like