我尝试在数据库中添加此行,但我遇到了问题:
Error 1136: Column doesn't match value count at row 1
表格是:
Table: client
Columns:
CFCL varchar(16) PK
CognomeCL varchar(30)
NomeCL varchar(30)
SessoCL varchar(1)
ComuneNascitaCL varchar(20)
DataNCL date
IndirizzoCL varchar(30)
TelefonoCL varchar(20)
CittadinanzaCL varchar(30)
PatenteCL varchar(10)
DataSCL date
这是我做的查询:
INSERT INTO cliente (CFCL, CognomeCL, NomeCL , SessoCL , ComuneNascitaCL,
DataNCL, IndirizzoCL, TelefonoCL, CittadinanzaCL, PatenteCL, DataSCL)
VALUES('MNA12OSQWDEWEWO8', 'Cognome', 'nome', 'F', 'Abbasanta', '1995-07-07', 'via pisa,
21', '0803597845', 'italiana', 'ba1234567q', '2020-07-07', 'mail@gmail.com');
有什么问题?
答案 0 :(得分:1)
您正在尝试插入更多值...当您尝试将值插入12列时,有11列。
答案 1 :(得分:0)
删除'mail@gmail.com'
INSERT INTO cliente (CFCL, CognomeCL, NomeCL , SessoCL , ComuneNascitaCL,
DataNCL, IndirizzoCL, TelefonoCL, CittadinanzaCL, PatenteCL, DataSCL)
VALUES
('MNA12OSQWDEWEWO8', 'Cognome', 'nome', 'F', 'Abbasanta', '1995-07-07',
'via pisa, 21', '0803597845', 'italiana', 'ba1234567q', '2020-07-07');