when i was using mysql, i created a simple group and when i was inserting values this happened
1 queries executed, 0 success, 1 errors, 0 warnings
Query: INSERT INTO emp(id, ename,sal,rank) VALUES( 01, 'jacob', 10,000, 'supervisor' )
Error Code: 1136 Column count doesn't match value count at row 1
Execution Time : 0 sec Transfer Time : 0 sec Total Time : 0.008 sec I don't know why this happened but will like to include I am new to SQL, this is my table data:
CREATE TABLE emp(
id int(11) NOT NULL AUTO_INCREMENT,
ename varchar(50) DEFAULT NULL,
sal int(11) DEFAULT NULL,
rank varchar(50) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
this is what i tried to insert:
INSERT INTO emp(id, ename,sal,rank)
VALUES(01,'jacob',10,000,'supervisor');
SELECT * FROM emp;
i seriously do not know why the code won't work, can anyone help?
10,000
with a comma, which is interpreted as 2 numbers – Yann39