lastval()
Semantics
- An error is raised if
nextval()
has not been called in the current session.
Create two sequences and call for each of them.
yugabyte=# CREATE SEQUENCE s1;
CREATE SEQUENCE
yugabyte=# SELECT nextval('s1');
nextval
nextval
1
(1 row)
lastval
lastval
(1 row)