Given SQL statement is an example of which category of SQL commands? SELECT *…
2024
Given SQL statement is an example of which category of SQL commands?
SELECT * FROM table_name
- A.
Data Definition Language
- B.
Data Manipulation Language
- C.
Data Control Language
- D.
Transaction Control Language
Attempted by 944 students.
Show answer & explanation
Correct answer: B
Concept
SQL commands are grouped by the function they perform. A Data Manipulation Language (DML) is the sub-language used to retrieve and modify the rows stored in a table — it operates on the data, not on the schema or on access rights. Retrieval (querying) is therefore a DML operation in the classical relational-model classification.
Application
SELECT * FROM table_name reads existing rows from a table and returns them; it neither creates/alters the table structure nor changes who may access it. Reading/retrieving data is a manipulation of the stored data, so this statement falls under DML.
The four categories
DDL (Data Definition Language) — defines or changes the schema:
CREATE,ALTER,DROP.DML (Data Manipulation Language) — works with the rows:
SELECT,INSERT,UPDATE,DELETE.DCL (Data Control Language) — controls access/permissions:
GRANT,REVOKE.TCL (Transaction Control Language) — controls transactions:
COMMIT,ROLLBACK,SAVEPOINT.
Cross-check
Vendor references agree: Oracle's SQL Language Reference and the MySQL manual both list SELECT among the Data Manipulation statements. Some teaching schemes further split retrieval into a separate Data Query Language (DQL); however, DQL is a sub-set carved out of DML and is not one of the four categories offered here, so the correct choice among the given options is Data Manipulation Language.