![]() This statement activates INSERT and UPDATE triggers. ![]() See Partition Pruning and Selection for details on the PARTITION clause. The IGNORE and DELAYED options are ignored when you use ON DUPLICATE KEY UPDATE. This function is particularly useful for multi-rows inserts. It returns the column values from the INSERT portion of the statement. The VALUES() function can only be used in a ON DUPLICATE KEY UPDATE clause and has no meaning in any other context. If the table has an AUTO_INCREMENT primary key and the statement inserts or updates a row, the LAST_INSERT_ID() function returns its AUTO_INCREMENT value. It is not recommended to use this statement on tables with more than one unique index. ![]() If more than one unique index is matched, only the first is updated. The row/s affected value is reported as 1 if a row is inserted, and 2 if a row is updated, unless the API's CLIENT_FOUND_ROWS flag is set. ![]() ON DUPLICATE KEY UPDATE is a MariaDB/MySQL extension to the INSERT statement that, if it finds a duplicate unique or primary key, will instead perform an UPDATE. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |