Answers for "create sequence if not exists postgres"

SQL
0

create sequence if not exists postgres

CREATE SEQUENCE IF NOT EXISTS tbl_field_seq;
Posted by: Guest on January-26-2021
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 "create sequence if not exists postgres"

Code answers related to "SQL"

Browse Popular Code Answers by Language