密钥1的条目'2147483647'重复 [英] Duplicate entry '2147483647' for key 1

查看:84
本文介绍了密钥1的条目'2147483647'重复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

奇怪的问题,我似乎无法理解.我在MySQL数据库中有一个具有以下结构的表...

Strange problem I can't seem to get my head around. I have a table in a MySQL database with the following structure...

    CREATE TABLE IF NOT EXISTS `tblbaseprices` (
  `base_id` bigint(11) NOT NULL auto_increment,
  `base_size` int(10) NOT NULL default '0',
  `base_label` varchar(250) default NULL,
  `base_price_1a` float default NULL,
  `base_price_2a` float default NULL,
  `base_price_3a` float default NULL,
  `base_price_1b` float default NULL,
  `base_price_2b` float default NULL,
  `base_price_3b` float default NULL,
  `site_id` int(11) default NULL,
  PRIMARY KEY  (`base_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=134 ;

我在其中拥有的最后一个base_id是132.您可以看到,我假设有几条记录已被删除,而auto_increment设置为134.我正在尝试运行以下SQL语句,当我这样做时,出现错误键1的重复条目'2147483647'".

The last base_id I have in there is 132. I assume a couple of records have been deleted to auto_increment is set to 134, as you can see about. I am trying to run the following SQL statement, and when I do, I get the error "Duplicate entry '2147483647' for key 1".

INSERT INTO tblbaseprices (site_id, base_size, base_price_1a, base_price_2a, base_price_3a, base_price_4a) VALUES ('', '', '', '', '', '')

有人有什么主意吗?

非常感谢!

推荐答案

使用您的代码,我收到此错误-字段列表"中的未知列"base_price_4a". 这意味着您正在尝试插入另一个表(可能在另一个模式中),并且该表具有主键INT和AUTO_INCREMENT = 2147483647.

With you code I got this error - Unknown column 'base_price_4a' in 'field list'. It means that you are trying to insert into another table (maybe in another schema), and that table has primary key INT and AUTO_INCREMENT=2147483647.

这篇关于密钥1的条目'2147483647'重复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆