3 ms·
It is such a common operation that I think MariaDB is doing the right thing by having a dedicated command for it, "INSERT ... ON DUPLICATE KEY UPDATE": https:/
by TekMol 6y ago
It is such a common operation that I think MariaDB is doing the right thing by having a dedicated command for it, "INSERT ... ON DUPLICATE KEY UPDATE":
https://mariadb.com/kb/en/insert-on-duplicate-key-update/ https://mariadb.com/kb/en/insert-on-duplicate-key-update/
- jakobdabo 6y agoAlso, REPLACE INTO...
- gweinberg 6y agoI've been burned with replace. The problem is that if you have fields with default values they will be set/reset to the default even if nothing changed. What I'd like to happen is that for any values that I don't supply, the table values remain unchanged.
- WesolyKubeczek 6y agoYou can kiss your ON DELETE CASCADE foreign-keyed data goodbye each time you use it.
- masklinn 6y agopostgres has insert … on conflict update since 9.5, and sqlite copied that.