-
-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export as SQL UPDATEs #125
Comments
Looking forward to this feature being implemented. This feature would be helpful when cloning data to a row with different condition then primary key. |
Isn't an |
When we use REPLACE the old row is deleted before the new row is inserted, some times its a problem when we have FKs and Triggers. I tried to use REPLACE when the table has a trigger (when insert) and the new row was created in the target table. |
If you are simply cloning, yes. However, with update statement, the condition can be changed to something else, which would be handy as a way to copy the data out and paste to many columns. Also, HeidiSQL provide both REPLACE and DELETE/INSERT, which basically do the same thing, so I think similarity is not a point to reject this feature request. |
I also have this need right now - restoring a bunch of rows from a database - just a portion, not all. REPLACE doesn't work because of constraints - it's tedious to write a parser to generate UPDATEs from INSERT/REPLACE, but it seems that is my only solution right now :( |
Any chance that this feature will be implemented? I am testing HeidiSQL at the moment and have to export some data as UPDATE statement. INSERT/DELETE or REPLACE did not work, because I have some constraints on my PK. |
Next build has an SQL UPDATEs option in the grid export dialog, and in the "Copy as" context menu. |
Initial discussion at: https://www.heidisql.com/forum.php?t=24901
Feature request: implement the ability to export as
SQL UPDATEs
on the export grid rows dialog, in addition to another modes likeSQL INSERTs
,SQL REPLACEs
andSQL DELETEs/INSERTs
.It should acts like
SQL DELETEs/INSERTs
(specifically theDELETEs
logic part), that requires the PK index to be defined on results grid, else should display the errorCannot compose WHERE clause - column missing: 1%s
(transifex hash dddc23307a48479ee39cb81e002025b9). Additionally, theUPDATEs SET
should exclude PK index column.The text was updated successfully, but these errors were encountered: