SQL Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to SQL. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 3 - Consider the following schema −

HONOURS_SUBJECT(subject_code, subject_name, department_head);
LOCATIONS(subject_code, department_name, location_id, city);

Select the right query for retrieving records from the tables HONOURS_SUBJECT and LOCATIONS with the USING clause

A - select h.subject_name, l.department_name, h.department_head, l.city from honours_subject h join location l using(subject_code);

B - select h.subject_name, l.department_name, h.department_head, l.city from honours_subject h natural join location l using(subject_code);

C - select h.subject_name, l.department_name, h.department_head, l.city from honours_subject h, location l using(subject_code);

D - None of the above.

Answer : A

Q 6 - Which of the following comparison operators could be used in a multiple row query?

A - IN operator

B - ANY operator

C - ALL operator

D - All of the above

Answer : D

Q 7 - Which statement allows conditional update, or insertion of data into a table simultaneously?

A - INSERT statement

B - MERGE statement

C - UPDATE statement

D - None of the above

Answer : B

Q 8 - Which of the following code will remove all the rows from the table LOCATIONS?

A - DROP TABLE locations;

B - DELETE TABLE locations;

C - TRUNCATE TABLE locations;

D - None of the above.

Answer : C


sql_questions_answers.htm

Advertisements