Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save codewizard13/26163b8b5b2a80f6c4247f820875a86f to your computer and use it in GitHub Desktop.
Save codewizard13/26163b8b5b2a80f6c4247f820875a86f to your computer and use it in GitHub Desktop.
NOTE: I can't find any clear answer anywhere else so I'm posting a new question.
## THE ISSUE
I'm following a MySQL tutorial from 2014 and I'm getting stuck at the insert statement. I checked the manual, but didn't find anything that clearly and kindly explained "this is how things were in 2014, and this is how and why they changed the INSERT statement"... Now, I'm not at all certain that the solution has anything to do with changes between the different versions, however that is my best guess so far.
I've install MySQL 8.0.11 and was able to create a new database and a table within the database. In the normal CRUD tutorial sequence, the next item is to ***insert a row or record into the table***. Unfortunately ***this is where the tutorial 'breaks'*** with the error:
> Error Code: 1136. Column count doesn't match value count at row 1 0.000 sec
## MY CODE
## WHAT I'VE TRIED
1. Double-checked to ensure ***column count DOES match*** the value count. I've got the same amount of values in my insert statement that I have columns in my table.
1. Web searched to find out if there have been any obvious and well known issues with the INSERT statement incorrectly reporting that the column length was wrong. I found none. These are the most useful of what I located, though they didn't solve my question:
* https://stackoverflow.com/questions/16293681/1136-column-count-doesnt-match-value-count-at-row-1
* https://stackoverflow.com/questions/48102798/error-column-count-doesnt-match-value-count-at-row-1
Searched YouTube for tutorials that might explain it. Unfortunately, every tutorial from the past few years that I have found seems to prefer using MySQL workbench, when I'm just trying to learn the stripped-down command line method.
I even [read the manual](https://dev.mysql.com/doc/refman/8.0/en/insert.html), but it was not forthcoming with any explanation either.
* https://dev.mysql.com/doc/refman/8.0/en/insert.html
## MY QUESTIONS
NOTE: _As Stack Overflow has recently started docking points/negatively judging/flagging posts will multiple questions, I must put this caveat: This is ONE question with multiple facets and I am asking pointed versions of the same question in order to have a more complete understanding of the _problem, causes, and possible solutions_. Thanks for understanding._
* Why am I getting an error saying that the columns are not the same quantity? By my count I have
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment