insert ingore好像表示不了 #2168

Open
opened 2022-08-21 14:21:43 +00:00 by chennqqi · 1 comment

当插入数据时,如出现错误时,如重复数据,将不返回错误,只以警告形式返回。所以使用ignore请确保语句本身没有问题,否则也会被忽略掉。例如:

INSERT IGNORE INTO books (name) VALUES (1, 'MySQL'),(1,'JAVA')

(1, 'MySQL')将会插入成功。

当插入数据时,如出现错误时,如重复数据,将不返回错误,只以警告形式返回。所以使用ignore请确保语句本身没有问题,否则也会被忽略掉。例如: ```INSERT IGNORE INTO books (name) VALUES (1, 'MySQL'),(1,'JAVA')``` (1, 'MySQL')将会插入成功。

我也希望能够支持一下

我也希望能够支持一下
lunny added the
kind
proposal
proposal:accepted
labels 2023-05-25 09:41:04 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#2168
No description provided.