Last answered:

11 Nov 2022

Posted on:

10 Nov 2022

0

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

Hi, folks!
I have written this piece of code, as it is shown in the video but I changed some data:

INSERT INTO employees
(
   emp_no,
   birth_date,
   first_name,
   last_name,
   gender,
   hire_date
) VALUES
(
   999902,
   '1986-04-22',
   'Jhoana',
   'Smith'
   'F',
   '2012-01-01'
);

However, I got the Error Code: 1136. Column count doesn't match value count at row
Why?? If basically,  I have the same syntax and I have written as many columns as values.



Thanks for your help!

3 answers ( 0 marked as helpful)
Posted on:

10 Nov 2022

0

Here you have a screenshoot :)

Posted on:

10 Nov 2022

1

Hello Lizeth,

You forgot to add a comma "," after 'Smith'.

Hope this helps,
Carl

Instructor
Posted on:

11 Nov 2022

1

Hi Lizeth and Carl!
Thanks for reaching out.

@: Carl
Thanks for sharing this piece of information with the Community!

@: Lizeth
As Carl said you missed the comma (,) after the value 'Smith'. Workbench treats the strings 'Smith' and 'F' as one column because they are not separated by a comma. Thus, the error is obtained that column count doesn't match value count.

Hope this helps.
Best,
Tsvetelin

Submit an answer