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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -