how to pass dynamic table name into mySQL Procedure with this query? <p>I have create procedure and when i pass table name manually then its working fine, but when i pass dynamic table name then it says <strong>dbname.tblname doesn't exist</strong>. </p> <pre><code>DELIMITER $$ CREATE PROCEDURE `lmsonline`.`delProc`(tblName VARCHAR(20),sr INT) BEGIN DELETE FROM tblName WHERE srno=sr; SET @num := 0; UPDATE tblName SET srno = @num := (@num+1); ALTER TABLE tblName AUTO_INCREMENT = 1; END$$ DELIMITER ; </code></pre> <p>and to execute i have <code>CALL delProc('beginner',6);</code></p>