I can't create a MySQL 5.0 Procedure. Can't find the error !!
Purpose -
It will just make copy of the record from one table to another.
I will give the ID (int-11) as parameter. eno (primary) is also int-11.
my Code -
Error -
Purpose -
It will just make copy of the record from one table to another.
I will give the ID (int-11) as parameter. eno (primary) is also int-11.
my Code -
Code:
CREATE PROCEDURE CopyMe (
IN id int(11)
)
BEGIN
INSERT INTO table1 SELECT * FROM table2 WHERE eno=id AND id NOT NULL;
END;
Error -
#1064 - 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 '' at line 3