DDL & DML Commands MCQs – NCERT Based Class 10 Objective Questions
DDL & DML Commands MCQs – NCERT Based Class 10 Objective Questions
Course: CBSE Class 10 Computer Science – MCQs with Answers and Explanations
Unit 3: Database Management System (DBMS)
Topic: DDL & DML Commands
Examination Board: CBSE Board Examinations
Unit 3: Database Management System (DBMS)
Topic: DDL & DML Commands
Examination Board: CBSE Board Examinations
1. DDL stands for:
Answer: A. Data Definition Language
Explanation: DDL commands define or modify the structure of database objects such as tables.
Explanation: DDL commands define or modify the structure of database objects such as tables.
2. Which of the following is a DDL command?
Answer: C. CREATE
Explanation: CREATE is a DDL command used to create tables and databases.
Explanation: CREATE is a DDL command used to create tables and databases.
3. DML stands for:
Answer: A. Data Manipulation Language
Explanation: DML commands manage data within tables.
Explanation: DML commands manage data within tables.
4. Which of the following is a DML command?
Answer: C. INSERT
Explanation: INSERT adds new records into a table.
Explanation: INSERT adds new records into a table.
5. Which command deletes table structure?
Answer: B. DROP
Explanation: DROP removes the entire table including structure and data.
Explanation: DROP removes the entire table including structure and data.
6. Which DDL command modifies table structure?
Answer: B. ALTER
Explanation: ALTER changes table structure like adding columns.
Explanation: ALTER changes table structure like adding columns.
7. Which DML command retrieves data?
Answer: A. SELECT
Explanation: SELECT fetches records from a table.
Explanation: SELECT fetches records from a table.
8. Which command updates existing records?
Answer: B. UPDATE
Explanation: UPDATE modifies existing data using SET and WHERE clauses.
Explanation: UPDATE modifies existing data using SET and WHERE clauses.
9. Which DML command removes specific rows?
Answer: B. DELETE
Explanation: DELETE removes selected records.
Explanation: DELETE removes selected records.
10. TRUNCATE command is categorized as:
Answer: B. DDL
Explanation: TRUNCATE removes all rows but keeps structure and is treated as DDL.
Explanation: TRUNCATE removes all rows but keeps structure and is treated as DDL.
11. Which command creates a database?
Answer: A. CREATE DATABASE
Explanation: Used to create a new database.
Explanation: Used to create a new database.
12. Which command removes all data but keeps table structure?
Answer: C. TRUNCATE
Explanation: TRUNCATE clears all records quickly.
Explanation: TRUNCATE clears all records quickly.
13. Which clause is used with UPDATE?
Answer: C. Both A and B
Explanation: UPDATE uses SET to change values and WHERE to filter records.
Explanation: UPDATE uses SET to change values and WHERE to filter records.
14. Which command renames a table?
Answer: A. RENAME
Explanation: RENAME changes the table name.
Explanation: RENAME changes the table name.
15. Which command adds a new column?
Answer: A. ALTER ADD
Explanation: ALTER TABLE with ADD adds new column.
Explanation: ALTER TABLE with ADD adds new column.
16. Which category does SELECT belong to?
Answer: B. DML
Explanation: SELECT retrieves data.
Explanation: SELECT retrieves data.
17. Which command changes column data type?
Answer: B. ALTER
Explanation: ALTER modifies column properties.
Explanation: ALTER modifies column properties.
18. Which command removes database?
Answer: B. DROP DATABASE
Explanation: DROP DATABASE deletes database permanently.
Explanation: DROP DATABASE deletes database permanently.
19. Which command inserts multiple rows?
Answer: B. INSERT INTO
Explanation: INSERT INTO allows inserting one or more rows.
Explanation: INSERT INTO allows inserting one or more rows.
20. DELETE without WHERE clause will:
Answer: B. Delete all rows
Explanation: Without WHERE, DELETE removes all records but keeps structure.
Explanation: Without WHERE, DELETE removes all records but keeps structure.
