insert语法注意事项(ON

mysql insert语法注意事项(ON DUPLICATE KEY UPDATE )

蹲街弑〆低调 提交于 2019-12-02 17:49:28
mysql insert语法注意事项(ON DUPLICATE KEY UPDATE ) INSERT 语法 INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [(col_name,...)] VALUES ({expr | DEFAULT},...),(...),... [ ON DUPLICATE KEY UPDATE col_name=expr, ... ] 或: INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name SET col_name={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE col_name=expr, ... ] 或: INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [(col_name,...)] SELECT ... [ ON DUPLICATE KEY UPDATE col_name=expr, ... ] 一、 DELAYED 使用延迟插入操作 DELAYED 调节符应用于 INSERT 和 REPLACE 语句。当 DELAYED