MySQL Forums
Forum List  »  Newbie

Re: 1136 error Can't figure out how to fix it.
Posted by: Sébastien F.
Date: May 27, 2022 04:49PM

> Error Code: 1136. Column count doesn't match value count at row 1

To avoid this kind of error you can use the INSERT ... SET syntax https://dev.mysql.com/doc/refman/8.0/en/insert.html

And you should not use formatting chars in your values (no "," separators)

INSERT INTO Trading_Journal
SET
    Total_Return = '21293681.96', 
    Return_Per_Share = '0.02',
    Account_Balance = '21293681.96',
    ...
;

If need you can use REPLACE() to remove separators from your values.

Options: ReplyQuote


Subject
Written By
Posted
Re: 1136 error Can't figure out how to fix it.
May 27, 2022 04:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.