I am getting errors when inserting these data into the table Course.
INSERT INTO Course (Course_ID,Course_Name)
VALUES ('2019','CS');
VALUES ('1033','science');
VALUES ('1055','history');
VALUES ('3001','French');
Here is the details for creation of the table Course:
CREATE TABLE
(
Course_ID INT NOT NULL,
Course_Name VARCHAR(30) NOT NULL,
PRIMARY KEY (Course_ID)
);
You do not need to repeat values
, you do need to use a comma between sets of values, and the semicolon to terminate the statement is optional (but good practice).
INSERT INTO Course (Course_ID,Course_Name) VALUES
('2019','CS')
, ('1033','science')
, ('1055','history')
, ('3001','French');
Reference:
rextester demo: http://rextester.com/DBYKYI20580
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With