DROP PROCEDURE IF EXISTS proc_x; DELIMITER # CREATE DEFINER=root@localhost PROCEDURE proc_x(sequel CHAR) proc_main:BEGIN SET @SQL = CONCAT(@sequel); PREPARE stmt FROM @SQL; EXECUTE stmt; DEALLOCATE PREPARE stmt; END proc_main #
Above is a syntax for creating stored procedure in my mysql database. When i execute following statement i get error.
CALL proc_x("INSERT INTO tbl_rec(id,name,brnachID) values(10,'Krunal',07)");
Error : ERROR 1064 (42000) at line 93: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1
Can anyone help me how can i solve it?
Currently i'm using Mysql on UNIX.
Aucun commentaire:
Enregistrer un commentaire