(i) What will be the degree of student table?
Ans: 3 (degree means columns and total no of columns are 3)
(ii) What does ‘name’ represent in the above code snippet?
a) A table
b) A row
c) A column
d) A database
Ans: A column
(iii) What is true about the following SQL statement?
SelecT * fROM student;
a) Display content of table ‘student’
b) Display column names and content of table ‘student’
c) Results in error as improper case has been used
d) Display only the column names of table ‘student’
Ans: ii. Display column name and content of table ‘student’.
(Because SQL is not case-sensitive)
(iv) What will be 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’);
(b) No Error
(c) Depends on Compiler
(d) Successful compilation of the query
(Because we cannot use ‘VALUE’ keyword multiple times with single INSERT clause and also we are trying to insert value 109 two times in student_id column which is not possible because it is PRIMARY KEY)
(v) In the following query how many rows will be deleted?
DELETE student WHERE student_id =109;1
(b) All the rows where student ID is equal to 109
(c) No rows will be deleted
(d) 2 rows
Ans: i. 1 row
(Because student_id is a primary key and so it has all unique values.)