Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8389459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:43:58+00:00 2026-06-09T18:43:58+00:00

MySQL is issuing this error when I try to execute a query where the

  • 0

MySQL is issuing this error when I try to execute a query where the column count does match. Here is the structure of the table:

mysql> desc S_3068; 
+-------------------+----------------------+------+-----+---------+-------+ 
| Field             | Type                 | Null | Key | Default | Extra | 
+-------------------+----------------------+------+-----+---------+-------+ 
| SfmID             | smallint(5) unsigned | NO   | PRI | 1       |       | 
| DatValue          | float                | NO   |     | 0       |       | 
| DatRawValue       | int(10) unsigned     | NO   |     | 0       |       | 
| DatTime           | int(10) unsigned     | NO   | PRI | 0       |       | 
| DatBusOrder       | tinyint(3) unsigned  | NO   | PRI | 1       |       | 
| DatFormulaVersion | tinyint(3) unsigned  | NO   |     | 0       |       | 
+-------------------+----------------------+------+-----+---------+-------+ 
6 rows in set (0.00 sec) 

I get the aforementioned error when I execute this query:

mysql> insert ignore into S_3068 values (133, 15.82, 5542, 1339309260, 0, 1); 
ERROR 1136 (21S01): Column count doesn't match value count at row 1 

As you can see, the column count does match the value count. Now what’s even more puzzling is that the query works perfectly fine with SfmID = 132:

mysql> insert ignore into S_3068 values (132, 15.82, 5542, 1339309260, 0, 1); 
Query OK, 1 row affected (0.00 sec) 

SfmID being a unsigned smallint, that doesn’t make any sense to me.

Any help on this matter would be greatly appreciated.

EDIT: The error was caused by a trigger associated to the table. Please see comments for more information.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:44:00+00:00Added an answer on June 9, 2026 at 6:44 pm

    The error was caused by a trigger associated to the table, doing a side insert on another table for value 133 but not for value 132. The error issued by MySQL was about the other table (which column count was indeed wrong) and not about the main table in which I was inserting data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

MySQL is returning a syntax error for this query (via PHP): INSERT INTO links
Mysql query question How to count as 1 if is 1,2 or 5 for
mysql> select count(*) from table where relation_title='xxxxxxxxx'; +----------+ | count(*) | +----------+ | 1291958
mysql> ALTER TABLE category ADD CONSTRAINT category_parent_category_id FOREIGN KEY (parent) REFERENCES category(id); ERROR 1005
mysql is outputting this error You have an error in your SQL syntax; check
When a deadlock situation occurs in MySQL/InnoDB, it returns this familiar error: 'Deadlock found
I have this real weird exception when issuing a basic SELECT, using MySQL 5.1.32-community
mysql_query(UPDATE neuralnetwork set value= value + 1 WHERE varName='count'); This query is increasing value
When using MySQL MyISAM tables, and issuing an ALTER TABLE statement to add a
MySQL 5.0.45 What is the syntax to alter a table to allow a column

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.