Which set of SQL language commands is used to query and update a database?
2024
Which set of SQL language commands is used to query and update a database?
Answer: D. Data Manipulation Language (DML) — SQL statements are grouped into sub-languages by function: Sub-language Commands Operates on Data Definition Language (DDL) CREATE, ALTER, DROP Schema objects…
- A.
Data Definition Language (DDL)
- B.
Both Data Control Language (DCL) and Data Definition Language (DDL)
- C.
Data Control Language (DCL)
- D.
Data Manipulation Language (DML)
- E.
Question not attempted
Attempted by 1422 students.
Show answer & explanation
Correct answer: D
SQL statements are grouped into sub-languages by function:
Sub-language | Commands | Operates on |
|---|---|---|
Data Definition Language (DDL) | CREATE, ALTER, DROP | Schema objects — tables, columns, structure |
Data Manipulation Language (DML) | SELECT, INSERT, UPDATE, DELETE | The data rows themselves — read and write |
Data Control Language (DCL) | GRANT, REVOKE | User access permissions |
Transaction Control Language (TCL) | COMMIT, ROLLBACK | Transactions |
Only DML's commands act on the data rows themselves — SELECT reads them (a query) and INSERT/UPDATE/DELETE write them (an update). This question asks for the command set that does BOTH — query the database AND update it.
Data Definition Language (DDL) only defines or alters schema objects such as tables and columns — it never reads or writes the data rows stored inside them.
Data Control Language (DCL) only manages who may access the database by granting or revoking permission — it never reads or writes data rows itself.
Combining DCL and DDL still leaves no command that reads or writes data rows, so that pairing cannot query or update data either.
“Question not attempted” is not a command language at all; it simply marks the item as unanswered.
Therefore, the correct set of commands for querying and updating a database is Data Manipulation Language (DML).