distal-attribute
distal-attribute
distal-attribute
distal-attribute

copy procedure

BubikolRamios posted 3 years ago in General
Have a proc in one db and want to make same in another.
In first I can copy create code, and now ?
Can't find a way to paste that somewhere and execute in another db.
ansgar posted 3 years ago
Just use the "Export database" dialog: Set output to "Database" and select target database below.
BubikolRamios posted 3 years ago
Thanks. Was playing with that but was not going anywhere until you extra told me (-:
combuilder posted 2 years ago
This option works perfect!

But i cannot understand Why copying the code doesn't work!
combuilder posted 2 years ago
anse:
After a few test, could you add this in the procedure code:
DELIMITER //
CREATE DEFINER .......
.....
END //
DELIMITER ;


With this extra code at the beginning and at the end, everything works fine!

ansgar posted 2 years ago
The DELIMITER is not part of the code physically required for creating the procedure, so it should not be contained in the "CREATE CODE" tab. For this purpose, HeidiSQL has a button (the one on the main toolbar with the red semikolon on it). If that was part of the CREATE CODE, that would also *implicitely* kill any delimiter you have set before via that button. That's not a good idea.
combuilder posted 2 years ago
I tried what you told me in the previous meessage. Now, i understand!

I think you're right related to the CREATE CODE, but, i wonder Why don't you add this "extra" feature as an option, becasue i think it doesn't cost su much adding this as an option!


ansgar posted 2 years ago
The "make it optional please" argument is such overstressed already, it's used for just every feature request which does not make sense in many users eyes.

But apart from that, as said above: If the delimiter was part of the CREATE CODE, that would also *implicitely* kill any delimiter you have set before via that button.

Please login to leave a reply, or register at first.