Multiple choice technology platforms and products

Sequences are accessed using

  1. prevval

  2. currval

  3. newval

  4. lastval

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Database sequences are typically accessed using CURRVAL (and often NEXTVAL) to retrieve the current or next value in a sequence. CURRVAL returns the current sequence value, while NEXTVAL increments and returns the next value. PREVVAL (A) is not standard SQL, NEWVAL (C) doesn't exist in sequence operations, and LASTVAL (D) is PostgreSQL-specific (lastval() function) but not the universal sequence access method.