โ† All SQL Flashcard Decks

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
  1. 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.

  2. 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.

  3. Which DML statement would you use to change existing data without adding rows?

    Answer: UPDATE

    UPDATE modifies values in existing rows.

  4. 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.

  5. 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.

  6. 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.

  7. 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.