Column count doesn t match value count at row 1

0 votes


I used a SQL dump file as the last entry mentioned below:-

INSERT INTO `wp_posts` VALUES(2781, 3, '2013-01-04 17:24:19', '2013-01-05 00:24:19'.

I have been trying to insert this value to the table:-

INSERT INTO `wp_posts` VALUES(5, 5, '2005-04-11 09:54:35', '2005-04-11 17:54:35'

But I keep getting the ERROR, "Column count doesn't match value count at row 1." So I am confused and lost on the concept of how the column and row apply here. Doesn't 2781, 3 mean row 2781 and column 3 and doesn't 5,5 mean row 5 and column 5?

Feb 11 in Others by Soham
• 8,730 points
437 views

1 answer to this question.

0 votes

The ERROR you are receiving implies that you are providing not as much data as the table wp_posts includes the various columns and due to this, now the DB engine does not know in which columns to put your data. To overcome this you must provide the names of the columns you want to fill. Example:

insert into wp_posts (column_name1, column_name2) values (1, 3)

Check up the table definition and see which columns you want to fill. Following which insert means you are inserting a new record. You are not modifying an existing one. Use an update for that.

answered Feb 11 by Rahul
• 8,980 points

Related Questions In Others

0 votes
0 answers

How is it possible for DynamoDB to support both Key-Value and Document database properties at the same time

As per DynamoDB's documentation, it supports both ...READ MORE

Apr 5 in Others by Kichu
• 16,850 points
34 views
0 votes
0 answers

SIP simulation programs at home

Hi all, We have Cisco's packet tracer ...READ MORE

Nov 26, 2018 in Others by sandeep
• 260 points
175 views
0 votes
1 answer

Error: missing value where TRUE/FALSE needed

Hello @ nimarah, Your error seems to be in ...READ MORE

answered Aug 24, 2020 in Others by Niroj
• 82,680 points
507 views
0 votes
1 answer

How to retrieve the value of a text field in Flutter App?

Hi@akhtar, In your TextField, you can call one ...READ MORE

answered Sep 3, 2020 in Others by MD
• 95,340 points
667 views
0 votes
1 answer
0 votes
0 answers
0 votes
1 answer

#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’

This ERROR which is occurring will definitely ...READ MORE

answered Feb 10 in Others by Rahul
• 8,980 points
42 views
0 votes
1 answer

can somebody explain me what does "passing by value" and "Passing by reference" mean in C#?

To answer your question, “passing by value” ...READ MORE

answered Feb 10 in Others by Rahul
• 8,980 points
18 views
0 votes
1 answer

count() parameter must be an array or an object that implements countable in laravel

You will have to make one change ...READ MORE

answered Feb 10 in Others by Rahul
• 8,980 points
136 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP