ALTER TABLE table_name WITH NOCHECK ADD CONSTRAINT fk_constraint_name FOREIGN KEY(foreign_key_field) REFERENCES reference_table(primary_key_field) [ON DELETE CASCADE] [ON UPDATE CASCADE]
For example, we have existing Tables as below:
student(id, stname, gender)
Table studentphone is a child table of student but we forgot to put a foreign key constraint on field [id] in studentphone. To add a foreign key constraint on field [id] with CASCADE options in Table studentphone please see the code below.
ALTER TABLE studentphone WITH NOCHECK ADD CONSTRAINT fk_student_phone FOREIGN KEY(id) REFERENCES studenet(id) ON DELETE CASCADE ON UPDATE CASCADE