mysql - copy table data to a different database using stored procedure -
just wondering, im new stored procedures,
i tried
insert new.emp select * old.users
and worked , inserted data of users old table users new emp table.
but when did inside stored procedure im getting syntax error
create procedure insertnew insert new.emp select * old.users
what's difference?
in part of query getting syntax error? correct syntax creating stored procedure this:
delimiter // create procedure insertemployee() begin insert new.emp select * old.users; end // delimiter ;
Comments
Post a Comment