create sequence if not exists postgres

Solutions on MaxInterview for create sequence if not exists postgres by the best coders in the world

showing results for - "create sequence if not exists postgres"
Yanis
24 May 2019
1CREATE SEQUENCE IF NOT EXISTS tbl_field_seq;
Facundo
31 Jul 2017
1IF EXISTS (SELECT 0 FROM pg_class where relname = '<my sequence name here>' )
2THEN
3  --stuff here
4END IF;
5