Answers for "on delete of foreign key delete corresponding rows in other table"

0

on delete of foreign key delete corresponding rows in other table

ALTER TABLE ReferencingTable DROP 
   CONSTRAINT fk__ReferencingTable__MainTable;

ALTER TABLE ReferencingTable ADD 
   CONSTRAINT fk__ReferencingTable__MainTable 
      FOREIGN KEY (pk_col_1)
      REFERENCES MainTable (pk_col_1)
      ON DELETE CASCADE;
Posted by: Guest on June-10-2020

Code answers related to "on delete of foreign key delete corresponding rows in other table"

Browse Popular Code Answers by Language