Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 301 Bytes

postgres.md

File metadata and controls

15 lines (13 loc) · 301 Bytes

Get all sequences

SELECT c.relname FROM pg_class c WHERE c.relkind = 'S';

SQL to get current hibernate_sequence

select currval('hibernate_sequence');
SELECT last_value FROM hibernate_sequence;

SQL to get next hibernate_sequence

select nextval('hibernate_sequence');