Advertisements
Advertisements
प्रश्न
Choose the appropriate answer with respect to the following code snippet.
code snippet.
CREATE TABLE student(
name CHAR(30)
student_id INT,
gender CHAR(1),
PRIMARY KEY (student_id)
);
What will be the output of following query?INSERT INTO student
VALUES (“Suhana”,109,’F’),
VALUES (“Rivaan”,102,’M’),
VALUES (“Atharv”,103,’M’),
VALUES (“Rishika”,105,’F’),
VALUES (“Garvit”,104,’M’),
VALUES (“Shaurya”,109,’M’);पर्याय
Error
No Error
Depends on compiler
Successful completion of the query
MCQ
Advertisements
उत्तर
Error
Explanation:
INSERT INTO should use one VALUES keyword followed by multiple rows. Also, it student_id = 109 is repeated, but it is a PRIMARY KEY, so duplicate values are not allowed.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
