MCQs – SQL commands

(Last Updated On: March 28, 2018)

MCQ – This section contains multiple choice questions on SQL Commands with answers and explanation. Many of the objective questions are asked in software jobs written interviews.

 


Q) Which SQL commands can be used to delete all records from the table in a sql database?
  1. Delete
  2. Delete with where condition
  3. TRUNCATE
  4. DROP

Q) SQL Select statement to retrieve unique record from a table is
  1. SELECT DISTINCT
  2. SELECT UNIQUE
  3. SELECT UNION
  4. SELECT UNION ALL
View Answer
Answer: A

Q) SQL Command to remove stored procedure SQL
  1. Remove
  2. Drop
  3. Delete
  4. Erase
View Answer
Answer: B
NOTE: Stored procedure in SQL is also called stored function.

Q) Which SQL sub language is used for creating and destroying table structure?
  1. DDL
  2. DML
  3. TCL
  4. DCL
View Answer
Answer: B, DDL
Read detail of DDL and DML commands SQL interview questions