psql create sequence if not exists code example Example: create sequence if not exists postgres CREATE SEQUENCE IF NOT EXISTS tbl_field_seq;