โ† 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. Which SQL isolation level prevents dirty reads but still allows non-repeatable reads?

    Answer: READ COMMITTED

    READ COMMITTED prevents dirty reads by only seeing committed data, but another transaction can modify rows between reads in the same transaction.

  2. In IBM Db2, what does the FETCH FIRST n ROWS ONLY clause do?

    Answer: Limits the result set to the first n rows

    FETCH FIRST n ROWS ONLY is Db2's syntax to restrict result set size, equivalent to LIMIT in other databases.

  3. What is a correlated subquery?

    Answer: A subquery that references a column from the outer query

    A correlated subquery references columns from the outer query and is re-executed for each row processed by the outer query.

  4. Which aggregate function returns the number of rows that have a non-NULL value in a specified column?

    Answer: COUNT(column)

    COUNT(column) counts only non-NULL values in the specified column, while COUNT(*) counts all rows including NULLs.

  5. What SQL keyword is used to remove duplicate rows from a result set?

    Answer: DISTINCT

    The DISTINCT keyword in a SELECT statement eliminates duplicate rows from the result set.

  6. In SQL, what is the purpose of the COALESCE function?

    Answer: Returns the first non-NULL value from a list of expressions

    COALESCE evaluates its arguments in order and returns the first expression that is not NULL.

  7. Which type of JOIN returns all rows from the left table and only matching rows from the right table?

    Answer: LEFT OUTER JOIN

    A LEFT OUTER JOIN returns all rows from the left table; rows with no match in the right table have NULL in the right table's columns.