currval()

Return the current value of the sequence. Note that nextval must be called at least once prior to calling currval.

Reference: DuckDB 2.0.0

Arguments & returns

currval(sequence_name)

Scalar
Overload link sequence_name Returns
#01 VARCHAR BIGINT

Example

currval example
SQL
Haybarn WASM 2.0.0-rc12 · In your browser

Guide example · Run to view results.

Catalog examples

SELECT
  currval('my_sequence_name');