Top "On-duplicate-key" questions

ON DUPLICATE KEY UPDATE is an SQL feature in MySQL which allows a row to be updated instead on inserted in an INSERT query, if it would otherwise attempt to create a duplicate key in a unique index.

MySQL "Insert ... On Duplicate Key" with more than one unique key

I've been reading up on how to use MySQL insert on duplicate key to see if it will allow me …

mysql sql sql-insert on-duplicate-key
Too many auto increments with ON DUPLICATE KEY UPDATE

I have a basic table with columns: id (primary with AI) name (unique) etc If the unique column doesn't exist, …

mysql auto-increment on-duplicate-key
Prepared Statement syntax for ON DUPLICATE KEY UPDATE (number of params error)

Here is what I am trying to do. I want to insert into this table or update the record if …

java mysql sql-update prepared-statement on-duplicate-key
How to On Duplicate Key Update

I have this query that is executed in my Python script but when its inserting into the database and finds …

python mysql sql on-duplicate-key
SQL Server: multiple INSERT with MERGE

I'm trying to write bridge between MySQL database and SQL Server 2008 R2 to sync values in tables. I got stuck …

sql-server sql-server-2008-r2 on-duplicate-key multiple-insert
What is the correct syntax for INSERT INTO ... ON DUPLICATE KEY UPDATE in MySQL?

my table(s) structure (MySQL / each one is same as below) +-------+--------------+------+------+-------------------+ | Field | Type | Null | Key | …

php mysql on-duplicate-key
MS SQL equivalent of ON DUPLICATE KEY UPDATE / UPSERT

I'm a postgres user that's new to MS SQL. I need to replicate ON DUPLICATE KEY UPDATE functionality (sometimes called …

sql sql-server upsert on-duplicate-key
JSON fields have the same name

In practice, keys have to be unique within a JSON object (e.g. Does JSON syntax allow duplicate keys in …

json duplicates key jq on-duplicate-key
MySql - ON DUPLICATE KEY INSERT

I understand that there exists INSERT IGNORE and INSERT ... ON DUPLICATE KEY UPDATE. However, when there is a duplicate key, …

mysql sql insert on-duplicate-key