这是我的请求,
INSERT INTO user(name,user_id,url,email,created,updated,phone,organisationID,role) VALUES ('Bastien Frey', '2196898165', 'https://cubber.zendesk.com/api/v2/users/2196898165.json', 'bastien.frey@incityz.com', '2016-01-19T16:21:07Z', '2016-01-19T16:21:07Z', '', '30567951','end-user'),('mathilde zimmer', '2297486669', 'https://cubber.zendesk.com/api/v2/users/2297486669.json', 'mathilde.zimmer91290@gmail.com', '2016-01-26T12:04:20Z', '2016-01-26T12:04:20Z', '', '36094152','end-user')
最佳答案
您已将 user_id 列定义为有符号整数,并且您尝试插入大于 upper limit of this data type 的值(2147483647)。 MySQL 将值截断为数据类型允许的最大值(您没有启用严格的 sql 模式,否则您将收到错误)。使用 show warnings
命令查看警告。
将字段的数据类型更改为 unsigned int 或(无符号)bigint。
关于mysql - sql在数据库中插入错误的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38094984/