错误:错误1366:不正确的整数值:第1行的列“ID”的“ID_1”

时间:2013-12-14 21:03:08

标签: mysql sql

CREATE TABLE IF NOT EXISTS `Auction`.`Card_company` (
  `ID` VARCHAR(45) NOT NULL,
  `Card No.` INT NOT NULL,
  `Company name` VARCHAR(45) NOT NULL,
  `expiration date(YYDD)` DATE NOT NULL,
  PRIMARY KEY (`ID`, `Card No.`, `Company name`),
  CONSTRAINT `owner_ID`
    FOREIGN KEY (`ID`)
    REFERENCES `Auction`.`buyer_ID` (`ID`)
    ON DELETE CASCADE
    ON UPDATE CASCADE)
ENGINE = InnoDB;

上面是我的dml查询,下面是插入查询。

INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_1', 111111, '신한', '2001');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_2', 111113, '신한', '2002');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_4', 111115, '신한', '2003');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_4', 111116, '신한', '2004');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_5', 111117, '신한', '2005');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_6', 111118, '신한', '2006');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_7', 111119, '비씨', '2007');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_8', 111120, '비씨', '2008');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_9', 111121, '비씨', '2009');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_10', 111122, '비씨', '2010');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_11', 111123, '비씨', '2011');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_12', 111124, '롯데', '2012');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_13', 111125, '롯데', '2001');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_14', 111127, '롯데', '2002');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_15', 111128, '롯데', '2004');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_16', 111129, '롯데', '2006');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_17', 111130, '롯데', '2008');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_18', 111131, '현대', '2009');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_19', 111132, '현대', '2012');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_20', 111133, '현대', '2010');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_21', 111134, '현대', '2003');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_22', 111135, '현대', '2001');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_24', 111137, '삼성', '2005');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_24', 111139, '삼성', '2004');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_25', 111140, '삼성', '2007');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_26', 111141, '삼성', '2008');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_27', 111142, '삼성', '2010');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_28', 111143, '우리', '2009');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_29', 111144, '우리', '2011');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_1', 111112, '우리', '2010');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_3', 111114, '우리', '2005');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_13', 111126, '우리', '2006');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_23', 111136, '국민', '2008');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_23', 111138, '국민', '2003');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_30', 111139, '국민', '2004');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_31', 111140, '국민', '2010');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_32', 111141, '국민', '2011');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_33', 111142, '농협', '2012');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_34', 111143, '농협', '2008');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES ('ID_35', 111145, '농협', '2004');
INSERT INTO `Auction`.`Card_company` (`ID`, `Card No.`, `Company name`, `expiration date(YYDD)`) VALUES (NULL, NULL, '', NULL);

当我将工程师转发给数据时,发生了错误1366.

如何解决此问题?

0 个答案:

没有答案