====== MS-SQL - Fremdschlüssel erzeugen ====== ALTER TABLE t_filter_guids DROP CONSTRAINT FK_t_filter_guids_t_filter; ALTER TABLE t_filter_guids ADD CONSTRAINT FK_t_filter_guids_t_filter FOREIGN KEY (filterid) REFERENCES t_filter (id) ON DELETE CASCADE; [[https://stackoverflow.com/questions/3656099/how-to-delete-rows-in-tables-that-contain-foreign-keys-to-other-tables|Quelle]] {{tag>[MS-SQL T-SQL SQL Fremdschlüssel Constraint ON_DELETE_CASCADE]}}