SQL Online Quiz


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 1 - Consider the following schema −

STUDENTS(student_code, first_name, last_name, email, 
         phone_no, date_of_birth, honours_subject, percentage_of_marks);

Which of the following query would display the distinct honours subjects in the STUDENTS table?

A - select honours_subject from students;

B - select distinct honours_subject from students;

C - select all honours_subject from students;

D - select * from students;

Answer : B

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

Answer : D

Q 9 - Which of the following minimal code would create a sequence named loc_seq as a primary key of the LOCATIONS table?

A - create sequence loc_seq;

B - create sequence loc_seq on locations;

C - create loc_seq;

D - None of the above.

Answer : A

Q 10 - Which of the following is a system privilege?

A - Creating new users

B - Removing users

C - Removing tables

D - All of the above.

Answer : D

sql_questions_answers.htm
Advertisements