Which are DML statements? (Choose all that apply)
-
COMMIT
-
MERGE
-
UPDATE
-
DELETE
-
CREATE
-
DROP
DML (Data Manipulation Language) statements manipulate data: MERGE combines insert/update/delete (B is true), UPDATE modifies existing data (C is true), DELETE removes rows (D is true). COMMIT is a transaction control statement (TCL), not DML (A is false). CREATE and DROP are DDL statements (Data Definition Language), not DML (E and F are false).
To answer this question, we need to understand what DML (Data Manipulation Language) statements are. DML statements are used to modify and manipulate data within a database.
Let's go through each option to determine if it is a DML statement:
Option A) COMMIT - This statement is not a DML statement. COMMIT is used to permanently save any changes made within a transaction.
Option B) MERGE - This statement is a DML statement. MERGE is used to combine data from two tables based on a specified condition.
Option C) UPDATE - This statement is a DML statement. UPDATE is used to modify existing data in a table.
Option D) DELETE - This statement is a DML statement. DELETE is used to remove data from a table.
Option E) CREATE - This statement is not a DML statement. CREATE is used to create new database objects, such as tables, indexes, or views.
Option F) DROP - This statement is not a DML statement. DROP is used to remove existing database objects.
Therefore, the correct answers are options B, C, and D.