Any way to edit a Query Result from table w/no PK or index?

[expired user #3694]'s profile image [expired user #3694] posted 15 years ago in General Permalink
In HeidiSQL, I cannot manually edit a query result from a table that does not contain a PK or index.

Is there any way to circumvent this so that I can edit the table manually?

Thanks!
ansgar's profile image ansgar posted 15 years ago Permalink
That's not possible without the risk of data loss which is the reason why HeidiSQL blocks editing in that case. You can surely bypass this blocking and write your own
UPDATE mytable SET foo=1 WHERE bar=2
queries into the query editor and run them by F9. But the risk will be the same. The easiest and most consistent way is to add a unique or primary key - which is always good and also helps in performance optimization.
[expired user #3694]'s profile image [expired user #3694] posted 15 years ago Permalink
Thanks very much!

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