- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个下表:
dct_cry_id............cry_id............dct_id......分类......dct_connection_id(...)71.................13.................104276......................... ...70.........02110......................29............104276............ .7.........................02111......................37.......104276............ .8......................02112......................38.......104276............ .6......................0(...)591......................13......154614............ ..540..................02090......................36.......154614............ .46......................02091......................30.......154614............ .2........................0(...)
我使用以下查询
I use following query
INSERT INTO mytabletest1 (cry_id,`dct_id`)
-- VALUES (222)
SELECT
222, `dct_id`
FROM `mytabletest1`
WHERE `cry_id`
NOT IN
(
112, 115, 116, 117, 118,
973, 974, 975, 976, 977,
8
)
不幸的是,我有以下警告/错误消息:
"! #1062 - Duplicate entry '222-104276' for key 'cry_id'"
为什么我收到此消息?
此后,我检查了我的表格,我的查询有效:dct_cry_id............cry_id............dct_id............分类......dct_connection_id(...)71.................13.................104276......................... ...70.........02110......................29............104276............ .7.........................02111......................37.......104276............ .8......................02112......................38.......104276............ .6......................0153876........................222.................104276........................ .0........................0(...)591......................13......154614............ ..540..................02090......................36.......154614............ .46......................02091......................30.......154614............ .2........................015870......................222......154614............ ..0......................0(...)
最佳答案
您的查询将返回键“222-104276”4 次。该记录已插入一次,第二次插入时出现错误。
关于mysql - 使用 select : ! 插入 #1062 - key '222-104276' 的重复条目 'cry_id',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18768733/
我有一个下表: dct_cry_id............cry_id............dct_id......分类......dct_connection_id(...)71........
我是一名优秀的程序员,十分优秀!