Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL "Column count doesn't match value count" but the count DOES match
    primarykey
    data
    text
    <p>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: </p> <pre><code>mysql&gt; 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) </code></pre> <p>I get the aforementioned error when I execute this query: </p> <pre><code>mysql&gt; 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 </code></pre> <p>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: </p> <pre><code>mysql&gt; insert ignore into S_3068 values (132, 15.82, 5542, 1339309260, 0, 1); Query OK, 1 row affected (0.00 sec) </code></pre> <p>SfmID being a unsigned smallint, that doesn't make any sense to me. </p> <p>Any help on this matter would be greatly appreciated.</p> <p>EDIT: The error was caused by a trigger associated to the table. Please see comments for more information.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload