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, 2022 in Others by Soham
• 9,700 points
1,530 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, 2022 by Rahul
• 9,670 points

Related Questions In Others

0 votes
1 answer

Excel delete row if column contains value from to-remove-list

Given sheet 2: ColumnA ------- apple orange You can flag the rows ...READ MORE

answered Nov 6, 2022 in Others by narikkadan
• 52,000 points
241 views
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, 2022 in Others by Kichu
• 19,040 points
262 views
0 votes
1 answer

Transpose column on one sheet to row on another, with linking

select A1:J1 in worksheet B and enter: =TRANSPOSE('worksheet ...READ MORE

answered Sep 25, 2022 in Others by narikkadan
• 52,000 points
131 views
0 votes
1 answer

How to freeze the top row and the first column using XlsxWriter?

You can use worksheet.freeze_panes() to achieve this . There ...READ MORE

answered Oct 11, 2022 in Others by narikkadan
• 52,000 points
367 views
0 votes
1 answer
0 votes
0 answers
0 votes
1 answer
0 votes
1 answer

#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’

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

answered Feb 10, 2022 in Others by Rahul
• 9,670 points
417 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, 2022 in Others by Rahul
• 9,670 points
248 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, 2022 in Others by Rahul
• 9,670 points
2,905 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP