Error Code: 1136. Column Count doesn’t match value Count at Row 2

Asked

Viewed 70 times

0

Good night,

I’m making a table in Mysql Workbench where it shows data from an accounts receivable department, however I’m having a problem when I will enter the values it gives the error 1136 and I’ve reviewed several times trying to look for some syntax error or if the amount of columns and values did not beat even, but from what I saw is all right.

Follows part of the code where I entered the values:

insert into departamento (NOME, NUMERO, VALOR, VENCIMENTO, BANCO) values 
('ABC PAPELARIA', '100100', '5000', '2017-01-20', 'ITAU'),
('LIVRARIA FERNANDES', '100110', '2500', '2017-01-22' 'ITAU'),
('LIVRARIA FERNANDES', '100120', '1500', '2016-10-15', 'BRADESCO'),
('ABC PAPELARIA', '100130', '8000', '2016-10-15', 'SANTADER'),
('LER E SABER', '200120', '10500', '2018-04-26', 'BANCO DO BRASIL'),
('LIVROS E CIA', '200125', '2000', '2018-04-26', 'BANCO DO BRASIL'),
('LER E SABER', '200130', '11000', '2018-09-26', 'ITAU'),
('PAPELARIA SILVA', '250350', '1500', '2018-01-26', 'BRADESCO'),
('LIVROS MM', '250360', '500', '2018-12-18', 'SANTADER'),
('LIVROS MM', '250370', '3400', '2018-04-26', 'SANTADER'),
('PAPELARIA SILVA', '250380', '3500', '2018-04-26', 'BANCO DO BRASIL'),
('LIVROS E CIA', '453360', '1500', '2018-06-15', 'ITAU'),
('LIVRO MM', '453365', '5400', '2018-06-15', 'BRADESCO'),
('PAPELARIA SILVA', '453370', '2350', '2017-12-27', 'ITAU'),
('LIVROS E CIA', '453380', '1550', '2017-12-27', 'BANCO DO BRASIL'),
('ABC PAPELARIA', '980130', '4000', '2016-12-11', 'ITAU'),
('LIVRARIA FERNANDES', '770710', '2500', '2016-11-15', 'SANTADER'),
('ABC PAPELARIA', '985001', '3000', '2016-09-11', 'ITAU'),
('PAPEL E AFINS', '985002', '2500', '2016-03-12', 'SANTADER'),
('LER E SABER', '888132', '2500', '2017-03-05', 'ITAU');

 
  • 2

    The damage that a minus comma does not cause, huh ? But if you notice, in the error message explains that the error was on line 2 (Row 2).

1 answer

2


I think the mistake is in the third line:

('LIVRARIA FERNANDES', '100110', '2500', '2017-01-22' 'ITAU'),

missing a comma before 'ITAU':

insert into departamento (NOME, NUMERO, VALOR, VENCIMENTO, BANCO) values 
('ABC PAPELARIA', '100100', '5000', '2017-01-20', 'ITAU'),
-- ('LIVRARIA FERNANDES', '100110', '2500', '2017-01-22' 'ITAU'),<- Faltou uma virgula
('LIVRARIA FERNANDES', '100110', '2500', '2017-01-22', 'ITAU'),
('LIVRARIA FERNANDES', '100120', '1500', '2016-10-15', 'BRADESCO'),
('ABC PAPELARIA', '100130', '8000', '2016-10-15', 'SANTADER'),
('LER E SABER', '200120', '10500', '2018-04-26', 'BANCO DO BRASIL'),
('LIVROS E CIA', '200125', '2000', '2018-04-26', 'BANCO DO BRASIL'),
('LER E SABER', '200130', '11000', '2018-09-26', 'ITAU'),
('PAPELARIA SILVA', '250350', '1500', '2018-01-26', 'BRADESCO'),
('LIVROS MM', '250360', '500', '2018-12-18', 'SANTADER'),
('LIVROS MM', '250370', '3400', '2018-04-26', 'SANTADER'),
('PAPELARIA SILVA', '250380', '3500', '2018-04-26', 'BANCO DO BRASIL'),
('LIVROS E CIA', '453360', '1500', '2018-06-15', 'ITAU'),
('LIVRO MM', '453365', '5400', '2018-06-15', 'BRADESCO'),
('PAPELARIA SILVA', '453370', '2350', '2017-12-27', 'ITAU'),
('LIVROS E CIA', '453380', '1550', '2017-12-27', 'BANCO DO BRASIL'),
('ABC PAPELARIA', '980130', '4000', '2016-12-11', 'ITAU'),
('LIVRARIA FERNANDES', '770710', '2500', '2016-11-15', 'SANTADER'),
('ABC PAPELARIA', '985001', '3000', '2016-09-11', 'ITAU'),
('PAPEL E AFINS', '985002', '2500', '2016-03-12', 'SANTADER'),
('LER E SABER', '888132', '2500', '2017-03-05', 'ITAU');
  • 1

    Let’s see. Waiting for the girl to confirm to give her "like". Rs

  • Thank you so much! Now it worked, I hadn’t even noticed that I was missing this comma.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.