โ† All Oracle SQL Flashcard Decks

Oracle SQL DML Operations 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 DML Operations flashcards as text
  1. What is the purpose of the FOR UPDATE clause in an Oracle SQL SELECT statement?

    Answer: Locks selected rows to prevent other sessions from modifying them

    SELECT ... FOR UPDATE locks the selected rows until the transaction ends, preventing other transactions from modifying those rows.

  2. In Oracle SQL, which aggregate function is NOT ignored on NULL values?

    Answer: COUNT(*)

    COUNT(*) counts all rows including those with NULL values, while COUNT(column), SUM, AVG, and MAX all ignore NULLs.

  3. What does the NOWAIT option in SELECT ... FOR UPDATE NOWAIT do in Oracle SQL?

    Answer: Returns an error immediately if rows are already locked

    NOWAIT causes Oracle to immediately raise an ORA-00054 error instead of waiting if any requested rows are already locked by another session.

  4. Which Oracle SQL UPDATE syntax uses a subquery to update multiple columns at once?

    Answer: UPDATE t SET (col1,col2) = (SELECT v1,v2 FROM src WHERE ...)

    Oracle allows updating multiple columns simultaneously using SET (col1, col2) = (subquery) to pull values from another table.

  5. What is the effect of omitting the WHERE clause in an Oracle SQL UPDATE statement?

    Answer: All rows in the table are updated

    An UPDATE without a WHERE clause applies the SET changes to every row in the table, which is often an unintentional mistake.

  6. Which Oracle SQL feature enables you to see the data in a table as it existed at a past point in time?

    Answer: Flashback Query (AS OF TIMESTAMP)

    Oracle Flashback Query uses AS OF TIMESTAMP or AS OF SCN to query historical versions of data stored in the undo tablespace.