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 is the correct syntax to insert a single row?
Answer: INSERT INTO t (a,b) VALUES (1,2)
INSERT INTO table (columns) VALUES (values) is standard insert syntax.
What is the effect of UPDATE t SET price = price * 1.1?
Answer: Increases price by 10% for matched rows
It multiplies each row's price by 1.1, a 10% increase.
Which DML statement would you use to change existing data without adding rows?
Answer: UPDATE
UPDATE modifies values in existing rows.
Can a single INSERT statement add multiple rows in standard SQL?
Answer: Yes, with multiple VALUES tuples
INSERT INTO t VALUES (...),(...),(...) adds several rows at once.
What does a foreign key constraint do during an INSERT?
Answer: Rejects rows referencing a non-existent parent key
A foreign key prevents inserting a value with no matching parent row.
Which clause limits the number of rows affected by an UPDATE in databases that support it?
Answer: LIMIT
Some databases like MySQL allow LIMIT to cap rows changed by UPDATE.
What is the result of an UPDATE whose WHERE clause matches no rows?
Answer: Zero rows are changed and no error occurs
If no rows match, UPDATE simply affects zero rows without error.