Questions tagged [mysql-error-1136]

Error 1136 Column count doesn't match value count

If you get this error:

Error #1136- Column count doesn't match value count

It means that there is a mismatch between the number of columns in your INSERT query and the number of values that you are writing:

INSERT INTO `table` 
    (`column1`, `column2`)
VALUES
    ('field1')

Note that you can also get this error by omitting a comma:

INSERT INTO `table` 
    (column1, column2)
VALUES
    ('field1' 'field2')
26 questions
11
votes
2 answers

MySQL: Multiple Inserts for a single column

I'm looking for a way to do multiple row inserts when I'm only inserting data for a single column. Here is the example table: +-------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra …
tsgrasser
  • 712
  • 1
  • 5
  • 12
4
votes
2 answers

mysql error; Error Code: 1136. Column count doesn't match value count at row 1

I am just learning MySQL and am trying to create a basic table. But I am getting this error: Error Code: 1136. Column count doesn't match value count at row 1. Query is insert into user(username,password,email,created,last_updated) values ( …
Ashish Subedi
  • 53
  • 2
  • 6
2
votes
1 answer

MySQL Error 1136:Column count does not match value count at row 1

DROP TABLE IF EXISTS student; CREATE TABLE student( bannerid VARCHAR(9) PRIMARY KEY NOT NULL , lastname VARCHAR(45) NOT NULL , firstname VARCHAR(45) NOT NULL , major VARCHAR(45) NOT NULL DEFAULT 'undeclared' , gpa DECIMAL(2) NOT NULL…
kmaz13
  • 260
  • 1
  • 5
  • 14
2
votes
2 answers

MySQL Error: ON DUPLICATE KEY UPDATE, column count doesn't match value count at row

Can anyone see why I'm getting this error is causing an error: #1136 - Column count doesn't match value count at row 1 Here is the query: INSERT INTO `people`…
Petah
  • 45,477
  • 28
  • 157
  • 213
1
vote
0 answers

SQLSTATE[21S01]: Insert match column list: 1136 Column value count at row 1

Where is my problem? thks i don't understand Warning: PDOStatement::execute(): SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1 in C:\wamp32\www\patest\includes\functions_mysql.php…
1
vote
3 answers

Mysql Error 1136

I have read up on the error. It says that the sql passes more/less values than specified by table. But my table has 7 columns and i am sending 7 parameters, but still get the error. Please help Books_out_on_loan DROP TABLE IF EXISTS…
1
vote
1 answer

MySQL: Column count doesn't match value count. syntaxis error

I've looked at a couple questions similar to this, but none seem to be what I'm looking for. These are the values that I'm getting an error for. insert into Artist(artistId,…
1
vote
2 answers

#1136 - Column count doesn't match value count at row 161

Ok, so I'm editing some of my .sql files and I'm 100% positive I have 14 values assigned per row but it's giving me the 1136 error. Can anyone see something I cant? INSERT INTO `config_building`…
1
vote
0 answers

cannot insert record with chinese characters in mysql (Error 1366)

In mysql 5.1 database, I create a table, CREATE DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci; create table users ( Id int not null auto_increment comment '主键', username varchar(200)…
0
votes
1 answer

Copying duplicates into new table - Old MySQL version complicates

Due to an older version of MySQL I'm having to use some pretty outdated methods to get things done. At the moment I am trying to copy similar rows to another table based on a few distinct columns. The table holddups will be taking data from assets…
Fergus Barker
  • 1,282
  • 6
  • 16
  • 26
0
votes
1 answer

'Error Code: 1136. Column count doesn't match value count at row 1' and yet it does match

I've run into this error recently, and it's stalling my progress. Despite my values matching the number of columns, it is still displaying the error and I'm well and truly stumped. my table is as follows: DROP TABLE IF EXISTS `mydb`.`subject`…
Kudos
  • 21
  • 7
0
votes
0 answers

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

I have created the following table: CREATE TABLE `test2` ( `id` int(10) NOT NULL AUTO_INCREMENT, `A` varchar(30) DEFAULT NULL, `B` varchar(30) DEFAULT NULL, `C` varchar(30) DEFAULT NULL, `D` varchar(30) DEFAULT NULL, PRIMARY KEY…
JDoe
  • 27
  • 7
0
votes
1 answer

MySQL Insert Issue : #1136 - Column count doesn't match value count at row 1

Im trying to input value of continous counting debit-kredit into saldo column, heres my sql code I want to do debit - kredit and put in saldo column, my query above allows me to retrieve saldo values but not failed on inserting SET @variable =…
fahmi zikrul
  • 7
  • 1
  • 5
0
votes
1 answer

What should I change not to get error 1136 in MySQL?

CREATE TABLE IF NOT EXISTS `mushu`.`episode` ( `id_episode` INT UNSIGNED NOT NULL AUTO_INCREMENT, `number` VARCHAR(5) NOT NULL, `name` VARCHAR(50) NOT NULL, `episode_length` VARCHAR(10) NOT NULL, `location` VARCHAR(150) NOT NULL, …
Ema
  • 13
  • 1
0
votes
1 answer

MySQL - Column count doesn't match value count at row 1 - Syntax Appears Correct

This is my first time posting here so please go easy on me! A few things I've noticed: First off, this query throws out the following error: INSERT INTO test_table (col_one, col_two, col_three, col_four, col_five) VALUES (1, 2), ('three', 'four'),…
nirvanagar
  • 23
  • 3
1
2