CBSE Class 12 Computer Science Question 13 of 43

Practice Paper — Question 13

Back to all questions
13
Question

Question 13

Rewrite the following SQL statement after correcting the error(s). Underline the corrections made.

INSERT IN STUDENT (RNO, MARKS)   
VALUE (5, 78.5);
Answer
INSERT IN STUDENT (RNO, MARKS) -- Error 1  
VALUE (5, 78.5); -- Error 2

Error 1 — The correct syntax in SQL for inserting data into a table is "INSERT INTO", not "INSERT IN".

Error 2 — The correct keyword used in SQL to specify the values being inserted into the table is "VALUES", not "VALUE".

The corrected code is:

INSERT INTO STUDENT(RNO, MARKS) 
VALUES (5, 78.5);