โ† All Oracle SQL Flashcard Decks

Oracle SQL SELECT Statements Flashcards

6 cards from real Oracle SQL practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Oracle SQL SELECT Statements flashcards as text
  1. Which clause is used to filter rows AFTER grouping in Oracle SQL?

    Answer: HAVING

    The HAVING clause filters rows after the GROUP BY aggregation is applied, unlike WHERE which filters before grouping.

  2. What does SELECT DISTINCT do in Oracle SQL?

    Answer: Removes duplicate rows from the result set

    SELECT DISTINCT eliminates duplicate rows from the query result, returning only unique combinations of the selected columns.

  3. Which Oracle SQL keyword limits the number of rows returned using a row-limiting clause (Oracle 12c+)?

    Answer: FETCH FIRST

    Oracle 12c introduced the FETCH FIRST n ROWS ONLY syntax as the standard row-limiting clause.

  4. What is the purpose of the ORDER BY clause in a SELECT statement?

    Answer: Sorts the result set by one or more columns

    ORDER BY sorts the final result set in ascending (ASC) or descending (DESC) order based on specified columns.

  5. In Oracle SQL, which pseudo-column assigns a sequential number to each row in a result set before ORDER BY is applied?

    Answer: ROWNUM

    ROWNUM is a pseudo-column assigned by Oracle before sorting, so filtering with ROWNUM must be done in a subquery to work correctly with ORDER BY.

  6. Which Oracle SQL operator is used to compare a value against a list of values in a WHERE clause?

    Answer: IN

    The IN operator tests whether a value matches any value in a specified list, equivalent to multiple OR conditions.