Get sequence last value and increment_by : Sequence Value « Sequence « PostgreSQL






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

1.Get sequence next value
2.Get next sequence value
3.Reference sequence value in insert statement
4.Reference sequence value in table creation statement