← All IBM Certification Flashcard Decks

SQL Database Flashcards

7 cards from real IBM Certification practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 SQL Database flashcards as text
  1. What is the function of a CHECK constraint in SQL?

    Answer: Validates that column values satisfy a specified condition

    A CHECK constraint enforces a Boolean condition on column values, rejecting any row that does not satisfy it.

  2. In IBM Db2, which statement is used to permanently save changes made in a transaction?

    Answer: COMMIT

    COMMIT permanently saves all changes made since the last COMMIT or ROLLBACK point in the current transaction.

  3. Which SQL clause filters groups produced by GROUP BY before they are returned?

    Answer: HAVING

    HAVING filters aggregated groups after GROUP BY has been applied, whereas WHERE filters individual rows before grouping.

  4. What does the SQL UNION operator do?

    Answer: Combines the result sets of two SELECT statements, removing duplicates

    UNION combines result sets from two SELECT statements and removes duplicate rows; use UNION ALL to keep duplicates.

  5. In SQL, what is a surrogate key?

    Answer: A system-generated artificial identifier with no business meaning

    A surrogate key is an artificially generated value (such as an auto-incremented integer) used as a primary key independent of business attributes.

  6. Which SQL window function assigns a unique sequential integer to each row within a partition?

    Answer: ROW_NUMBER()

    ROW_NUMBER() assigns a unique, sequential integer to every row within a partition with no gaps or ties.

  7. What is the effect of setting a column as NOT NULL in a table definition?

    Answer: The column cannot store a NULL value

    NOT NULL is a column constraint that prevents NULL from being inserted or updated into that column.