Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

psql get sequences

# Get all sequences
SELECT c.relname FROM pg_class c WHERE c.relkind = 'S';

# Get last value of a sequence
SELECT last_value FROM test_id_seq;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #psql #sequences
ADD COMMENT
Topic
Name
8+7 =