Get sequence last value and increment_by
postgres=# CREATE SEQUENCE myseq MINVALUE 0;
CREATE SEQUENCE
postgres=#
postgres=# SELECT last_value, increment_by FROM myseq;
last_value | increment_by
------------+--------------
0 | 1
(1 row)
postgres=#
postgres=# drop sequence myseq;
DROP SEQUENCE
postgres=#
Related examples in the same category