Q. Choose appropriate answer with respect to the following code snippet.
CREATE TABLE student (
name CHAR(30),
student_id INT,
gender CHAR(1),
PRIMARY KEY (student_id))
;
a) What will be the degree of student table?
i) 30
ii) 1
iii) 3
iv) 4
b) What does ‘name’ represent in the above code snippet?
i) a table
ii) a row
iii) a column
iv) a database
c) What is true about the following SQL statement?
SelecT * fROM student;
i) Displays contents of table ‘student’
ii) Displays column names and contents of table ‘student’
iii) Results in error as improper case has been used
iv) Displays only the column names of table ‘student’
d) 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’);
i) Error
ii) No Error
iii) Depends on compiler
iv) Successful completion of the query
e) In the following query how many rows will be deleted?
DELETE student
WHERE student_id=109;
i) 1 row
ii) All the rows where student ID is equal to 109
iii) No row will be deleted
iv) 2 rows
Answer :-
a = iii) 3
b = iii) a column
c = i) Displays contents of table ‘student’
d = i) Error
e = iv) 2 rows
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )