Error Code: 1136. Column count doesn't match value count at row
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!
You forgot to add a comma "," after 'Smith'.
Hope this helps,
Hi Lizeth and Carl!
Thanks for reaching out.
Thanks for sharing this piece of information with the Community!
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.