Scalar function
The valid niladic/literal-sign form produces non-NULL values; NULL sign arguments are rejected.
Syntax
Scalar
Arguments
Returns
- Type: BIGINT
- NULL behavior: The valid no-argument/literal-sign form produces non-NULL values; NULL sign arguments are rejected.
Properties
Usage notes
- Each sequence column has its own counter, starting at 0 for each new query.
- Which number is assigned to each row can vary with execution order. Use ORDER BY to sort the output.
- Deterministic: The sequence assigned to each row can change with execution order.
Examples
Typical behavior
- A fresh query/sequence operator; sorted output.
Limitations
- Sequence values are not a persistent database sequence and are not guaranteed gap-free after upstream/downstream filtering or LIMIT.
- SEQ8 returns a signed 64-bit counter for both accepted sign modes. It does not produce unsigned 64-bit values.
Last modified on October 15, 2026