CREATE DEFINER='root'@'localhost'
PROCEDURE 'teste'(IN 'pId' VARCHAR(20))NO SQL
INSERT INTO gpetnaold.pessoal SELECT * FROM gpetna.pessoal WHERE gpetna.pessoal.id=pId;
INSERT INTO gpetnaold.contato SELECT * FROM gpetna.contato WHERE gpetna.contato.pessoal_id=pId;
Someone can help me with this error.
Placing in isolation any of the query works beautifully. when I put the two returns the error;
error 1064 'INSERT INTO gpetnaold.contact SELECT * FROM gpetna.contact WHERE gpetna.contato. ' at line 2 '