Data Manipulation Language (DML) Flashcards
7 cards from real SQL practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Data Manipulation Language (DML) flashcards as text
Which statement undoes uncommitted DML changes?
Answer: ROLLBACK
ROLLBACK reverts changes made since the last commit.
To update multiple columns in one UPDATE, you separate assignments with what?
Answer: Commas
Multiple column assignments in SET are separated by commas.
What does INSERT INTO table DEFAULT VALUES do?
Answer: Inserts a row using each column's default value
DEFAULT VALUES inserts a row where every column takes its default.
Which keyword in an UPDATE specifies the new value for a column?
Answer: SET
SET assigns new values to columns in an UPDATE.
A DELETE statement with a subquery in WHERE is used to do what?
Answer: Delete rows based on values from another query
A subquery in WHERE lets DELETE target rows matching a related query's results.
Which DML operation typically locks affected rows until the transaction ends?
Answer: UPDATE
UPDATE locks the rows it modifies until the transaction commits or rolls back.
What does the RETURNING clause (in supported databases) provide after an INSERT?
Answer: The values of the affected rows
RETURNING outputs column values from the rows affected by the statement.