I would be nice to have the possibility to create a procedure/ function copy similar to the already exisitng "Create new..." -> "Table copy" (right mouse click at any table). Thanks in advance!
Feature proposal: create a procedure/ function copy
There is a way how to make a quick copy of just everything into a different database: using the SQL export dialog. Just select the procedures, tables, whatever you want to copy, then rightclick them, and click "Export database as SQL". In the "Target" dropdown, select "Database", and there you are. HeidiSQL just don't offers the same database here, as there is no way to give the copied items another name.
Thanks for your proposal, Ansgar! This is the way I did it in the past. But this is a bit costly if you have to change multiple procedures/ functions/ events: Either you have to copy them to another database, rename them and copy them back nor you have modify the exported SQL code...
A "Create New.." -> "Procedure/ event/ function copy" dialogue might be possible by adding/ applying an internal "search and replace" within the "Export Database as SQL..." code. There are only three replacements needed... (see screenshot attached)
Please login to leave a reply, or register at first.