Answers for "how to check sequence is present or not in postgresql"

SQL
1

check current sequence value postgres

SELECT last_value FROM sequence_name;
Posted by: Guest on April-17-2020
0

how to check if a sequence exists in postgresql

IF EXISTS (SELECT 0 FROM pg_class where relname = '<my sequence name here>' )
THEN
  --stuff here
END IF;
Posted by: Guest on May-09-2021

Code answers related to "how to check sequence is present or not in postgresql"

Code answers related to "SQL"

Browse Popular Code Answers by Language