MYSQL错误需要建议

时间:2016-02-22 15:20:58

标签: mysql

CREATE TABLE TableNameHere (
  Home TEXT,
  Height INT,
  Weight INT,
  SignatureMoves TEXT,
  Biography TEXT
  );

INSERT INTO TableNameHere (Home, Height, Weight, SignatureMoves, Biography)
  VALUES ('', '', '', '', '');

Incorrect integer value: '' for column 'Height' at row 1

我不确定是什么问题

1 个答案:

答案 0 :(得分:3)

如果您想要空数据,请使用NULL作为数字字段:

INSERT INTO TableNameHere 
   (Home, Height, Weight, SignatureMoves, Biography) 
VALUES 
   ('', NULL, NULL, '', '');