Informatics Practices

SQL Revision MCQs | 25 Practice Questions with Answers | CBSE Class 12 Informatics Practices (IP)

Class 12 · Informatics Practices

SQL Revision MCQs (25 Questions)

Practice these multiple-choice questions to revise the SQL concepts covered in Class XI. Click Show Answer to reveal the correct answer and explanation.


Q1. What does DBMS stand for?

A. Data Backup Management System
B. Database Management System
C. Data Binary Management System
D. Database Memory System

Show Answer

Answer: B. Database Management System

Explanation: A DBMS is software used to create, store, retrieve, and manage databases efficiently.


Q2. Which of the following is an example of an RDBMS?

A. MySQL
B. Microsoft Excel
C. Notepad
D. Paint

Show Answer

Answer: A. MySQL

Explanation: MySQL is a Relational Database Management System (RDBMS).


Q3. A database is a:

A. Collection of related data
B. Collection of programs
C. Collection of images only
D. Collection of operating systems

Show Answer

Answer: A.

Explanation: A database is an organized collection of related data.


Q4. In a database table, a row is also known as a:

A. Field
B. Attribute
C. Record
D. Column

Show Answer

Answer: C. Record

Explanation: Each row in a table represents one complete record.


Q5. In a database table, a column is also known as a:

A. Record
B. Attribute (Field)
C. Tuple
D. Row

Show Answer

Answer: B.

Explanation: A column represents an attribute or field of the table.


Q6. Which key uniquely identifies each record in a table?

A. Foreign Key
B. Candidate Key
C. Primary Key
D. Alternate Key

Show Answer

Answer: C. Primary Key

Explanation: A Primary Key uniquely identifies every record in a table.


Q7. SQL stands for:

A. Structured Query Language
B. Simple Query Language
C. System Query Language
D. Standard Question Language

Show Answer

Answer: A.

Explanation: SQL is the standard language used to communicate with relational databases.


Q8. Which SQL command is used to create a table?

A. INSERT
B. CREATE TABLE
C. SELECT
D. UPDATE

Show Answer

Answer: B.

Explanation: The CREATE TABLE command creates a new table in a database.


Q9. Which SQL command is used to add records to a table?

A. UPDATE
B. INSERT
C. DELETE
D. ALTER

Show Answer

Answer: B.

Explanation: The INSERT command adds new records to a table.


Q10. Which SQL command retrieves data from a table?

A. FETCH
B. SELECT
C. SHOW
D. VIEW

Show Answer

Answer: B.

Explanation: The SELECT statement is used to retrieve data from one or more tables.


Q11. Which SQL command modifies existing records?

A. INSERT
B. UPDATE
C. DELETE
D. CREATE

Show Answer

Answer: B.

Explanation: The UPDATE command modifies existing records in a table.


Q12. Which SQL command removes records from a table?

A. DROP
B. DELETE
C. REMOVE
D. ERASE

Show Answer

Answer: B.

Explanation: The DELETE command removes records from a table without deleting the table structure.


Q13. Which clause is used to filter records in SQL?

A. ORDER BY
B. GROUP BY
C. WHERE
D. HAVING

Show Answer

Answer: C.

Explanation: The WHERE clause filters records based on specified conditions.


Q14. Which keyword removes duplicate values from the result?

A. UNIQUE
B. DISTINCT
C. DIFFERENT
D. FILTER

Show Answer

Answer: B.

Explanation: The DISTINCT keyword returns only unique values.


Q15. Which clause arranges records in ascending or descending order?

A. GROUP BY
B. WHERE
C. ORDER BY
D. HAVING

Show Answer

Answer: C.

Explanation: The ORDER BY clause sorts query results in ascending (ASC) or descending (DESC) order.



Q16. Which category of SQL commands is used to create and modify the structure of database objects?

A. DML (Data Manipulation Language)
B. DDL (Data Definition Language)
C. DCL (Data Control Language)
D. TCL (Transaction Control Language)

Show Answer

Answer: B. DDL (Data Definition Language)

Explanation: DDL commands such as CREATE, ALTER, and DROP are used to define or modify database structures.


Q17. Which category of SQL commands is used to insert, update, delete, and retrieve data?

A. DDL
B. DML
C. DCL
D. TCL

Show Answer

Answer: B. DML

Explanation: DML commands include INSERT, UPDATE, DELETE, and SELECT.


Q18. Which SQL command is used to change the structure of an existing table?

A. MODIFY
B. ALTER TABLE
C. UPDATE TABLE
D. CHANGE TABLE

Show Answer

Answer: B. ALTER TABLE

Explanation: ALTER TABLE is used to add, modify, or delete columns from an existing table.


Q19. Which SQL command permanently removes an entire table along with its data?

A. DELETE
B. REMOVE
C. DROP TABLE
D. ERASE

Show Answer

Answer: C. DROP TABLE

Explanation: DROP TABLE deletes both the table structure and all the records stored in it.


Q20. Which SQL statement will display only those students whose marks are greater than 80?

A. SELECT * FROM Student WHERE Marks > 80;
B. SELECT Student Marks > 80;
C. SHOW Student WHERE Marks > 80;
D. DISPLAY Student;

Show Answer

Answer: A.

Explanation: The WHERE clause filters records according to the specified condition.


Q21. A school database contains duplicate city names. Which keyword should be used to display each city only once?

A. UNIQUE
B. DISTINCT
C. DIFFERENT
D. FILTER

Show Answer

Answer: B. DISTINCT

Explanation: The DISTINCT keyword removes duplicate values from the result set.


Q22. Which SQL clause is used to arrange employee salaries from highest to lowest?

A. ORDER BY Salary DESC
B. ORDER BY Salary ASC
C. GROUP BY Salary
D. SORT Salary

Show Answer

Answer: A.

Explanation: The DESC keyword sorts data in descending order.


Q23. Which SQL statement correctly displays all records from the Employee table?

A. SELECT * FROM Employee;
B. SHOW Employee;
C. DISPLAY Employee;
D. GET Employee;

Show Answer

Answer: A.

Explanation: SELECT * retrieves all columns and all records from a table.


Q24. Which of the following statements is TRUE?

A. CREATE TABLE creates a new table.
B. INSERT adds records to a table.
C. UPDATE modifies existing records.
D. All of these.

Show Answer

Answer: D. All of these.

Explanation: These are the standard purposes of the SQL commands CREATE TABLE, INSERT, and UPDATE.


Q25. Which statement best summarizes SQL?

A. SQL is the standard language for relational databases.
B. SQL is used to create, retrieve, update, and delete data.
C. SQL includes DDL and DML commands for managing databases.
D. All of these.

Show Answer

Answer: D. All of these.

Explanation: SQL provides a complete set of commands for defining database structures and manipulating data in relational databases.


Answer Key

Q.No. Answer Q.No. Answer Q.No. Answer
1B11B21B
2A12B22A
3A13C23A
4C14B24D
5B15C25D
6C16B
7A17B
8B18B
9B19C
10B20A

Practice Tips

  • Revise the basic database concepts:
    • Database → Collection of related data.
    • DBMS → Software used to manage databases.
    • RDBMS → Stores data in related tables (e.g., MySQL).
  • Remember important SQL command categories:
    • DDLCREATE, ALTER, DROP
    • DMLSELECT, INSERT, UPDATE, DELETE
  • Know the purpose of common SQL commands:
    • CREATE TABLE → Creates a table.
    • INSERT → Adds new records.
    • SELECT → Retrieves data.
    • UPDATE → Modifies existing records.
    • DELETE → Removes records.
    • DROP TABLE → Deletes the table permanently.
  • Understand important clauses:
    • WHERE → Filters records.
    • DISTINCT → Displays unique values.
    • ORDER BY ASC → Sorts in ascending order.
    • ORDER BY DESC → Sorts in descending order.
  • Primary Key: Every table should have a Primary Key to uniquely identify each record.
  • CBSE Tip: Competency-based questions often present a real-life scenario and ask you to identify the correct SQL command or clause. Focus on understanding the purpose of each command rather than memorizing syntax alone.