Advertisement
Savelyev_Vyacheslav

pg set FK

May 26th, 2022
612
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*set foren key*/
  2. ALTER TABLE IF EXISTS public.listbrigade
  3.     ADD CONSTRAINT " TypeWork" FOREIGN KEY (typidfk)
  4.     REFERENCES public.listtypework (typidpk) MATCH SIMPLE
  5.     ON UPDATE NO ACTION
  6.     ON DELETE NO ACTION
  7.     NOT VALID;
  8. /*set foren key*/
  9. ALTER TABLE IF EXISTS public.listbrigade
  10.     ADD CONSTRAINT " Employees" FOREIGN KEY (IdPersonFK)
  11.     REFERENCES public. lisrEmployees (IdPersonPK) MATCH SIMPLE
  12.     ON UPDATE NO ACTION
  13.     ON DELETE NO ACTION
  14.     NOT VALID;
  15.  
Advertisement
RAW Paste Data Copied
Advertisement