简体   繁体   中英

Error 1136: Column doesn't match value count at row 1

I've tried to add this row at the DB, but i've the problem: Error 1136: Column doesn't match value count at row 1

the table is :

   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

and this is the query that i made :

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');

What is the problem?

You are trying to insert more values...there are 11 columns where as you are trying to insert values to 12 columns.

  1. remove the extra values in the insert query or
  2. add the missed fields to the table.

remove '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');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM