joaofabioma

table cidade

May 25th, 2022 (edited)
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Table: cep.cidade
  2.  
  3. -- DROP TABLE IF EXISTS cep.cidade;
  4.  
  5. CREATE TABLE IF NOT EXISTS cep.cidade
  6. (
  7.     id SERIAL NOT NULL,
  8.     nome character varying COLLATE pg_catalog."default",
  9.     estado_id integer,
  10.     CONSTRAINT cidade_pkey PRIMARY KEY (id),
  11.     CONSTRAINT cidade_estado_id_fkey FOREIGN KEY (estado_id)
  12.         REFERENCES cep.estado (id) MATCH SIMPLE
  13.         ON UPDATE NO ACTION
  14.         ON DELETE NO ACTION
  15. )
  16.  
  17. TABLESPACE pg_default;
  18.  
  19. ALTER TABLE IF EXISTS cep.cidade
  20.     OWNER to postgres;
Add Comment
Please, Sign In to add comment