CREATE TABLE rlc_nota_fiscal_x_requisicao_cliente_destino ( filial_nota integer NOT NULL, nota integer NOT NULL, serie character varying (6) NOT NULL, filial_req integer NOT NULL, requisicao integer NOT NULL, data date NOT NULL, hora time without time zone NOT NULL, usuario integer NOT NULL, PRIMARY KEY (filial_nota, nota, serie, filial_req, requisicao), CONSTRAINT fk_rlc_nota_fiscal_cliente_destino FOREIGN KEY (filial_nota, nota, serie) REFERENCES nfs_nota_fiscal (filial_nota, nota, serie) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE RESTRICT, CONSTRAINT fk_rlc_stq_requis_cliente_destino FOREIGN KEY (filial_req, requisicao) REFERENCES stq_requis (filial_req, requisicao) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE RESTRICT );