MySQL Forums
Forum List  »  Newbie

INSERT INTO table with "Column count doesn't match value count at row 1" error?
Posted by: Xavier Vasquez
Date: May 13, 2025 11:17AM

Hello,

I keep getting the error "Column count doesn't match value count at row 1" when trying to insert a row into my table.

Here is the table creation statement:
CREATE TABLE `prop_eclipse_violation` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`alert_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`violation_time` datetime NOT NULL,
`trading_account_id` varchar(25) NOT NULL,
`violation_type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`starting_balance` double DEFAULT NULL,
`current_balance` double DEFAULT NULL,
`threshold_balance` double DEFAULT NULL,
`passed/failed` varchar(45) DEFAULT NULL,
`review_date` datetime DEFAULT NULL,
`reviewer` varchar(100) DEFAULT NULL,
`validation_status` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
)

Here is my insert statement:
insert
into
alerts.prop_eclipse_violation
(
id,
alert_time,
violation_time,
trading_account_id,
violation_type,
starting_balance,
current_balance,
threshold_balance,
`passed/failed`
)
values
(
1,
'2025-05-13 11:49:10',
'2025-05-12 16:46:38',
'0-1234',
'Daily',
1,234,
2.345,
3.456,
'failed'
)

I've tried many iterations. I've tried adding all the column names and their respective column values and I still get the same error. Any help would be appreciated.

Options: ReplyQuote


Subject
Written By
Posted
INSERT INTO table with "Column count doesn't match value count at row 1" error?
May 13, 2025 11:17AM


Sorry, only registered users may post in this forum.

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.