I’m just learning sql and created my first table, as shown below using 3 columns (student_id, name, and major). when trying to insert data to the table (student id = 1, name = jack, major = biology), I receive the error at bottom. Unless I should remove something, it appears I have 3 columns and 3 values (rows?) so not sure how the column count and value count would differ. Thanks in advance for any help here.
CREATE TABLE student (
student_id INT,
name VARCHAR(20),
major VARCHAR(20),
PRIMARY KEY(student_id)
);
insert into student values (1,’Jack’, ‘Biology’);
—Error: Column count doesn’t match value count at row 1
Error Code: ER_WRONG_VALUE_COUNT_ON_ROW
I made 1 glaring character correction but recieved the same error message.
Dennis D is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.