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 2 - What is returned by SUBSTR(‘TUTORIALS POINT’, -1, 1)?

A - T

B - NULL

C - 0

D - N

Answer : A

Answer : D

Q 5 - A subquery can be placed in which of the SQL clauses?

A - The WHERE clause

B - The HAVING clause

C - The FROM clause

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 9 - Which of the following statement is used to modify a sequence?

A - ALTER SEQUENCE

B - SELECT SEQUENCE

C - DROP SEQUENCE

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