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 operations, UPDATE modifies existing rows, and DELETE removes rows. COMMIT is a transaction control statement (TCL). CREATE and DROP are DDL (Data Definition Language) statements that define schema structures, not manipulate data.
To answer this question, you need to understand the concept of Data Manipulation Language (DML) statements. DML statements are used to manipulate data stored in a database. Let's go through each option to understand which ones are DML statements:
Option A) COMMIT - This option is not a DML statement. COMMIT is used to save all the changes made in a transaction to the database.
Option B) MERGE - This option is a DML statement. The MERGE statement allows you to update or insert data into a target table based on the results of a join with a source table.
Option C) UPDATE - This option is a DML statement. The UPDATE statement is used to modify existing data in a table.
Option D) DELETE - This option is a DML statement. The DELETE statement is used to remove rows from a table.
Option E) CREATE - This option is not a DML statement. CREATE is a Data Definition Language (DDL) statement used to create database objects such as tables, views, and indexes.
Option F) DROP - This option is not a DML statement. DROP is a DDL statement used to remove database objects.
The correct answers are B, C, and D. These options are DML statements because they are used to manipulate data stored in a database.