How do I use cascade delete with SQL Server?

后端 未结 8 1256
抹茶落季
抹茶落季 2020-11-22 01:12

I have 2 tables: T1 and T2, they are existing tables with data. We have a one to many relationship between T1 and T2. How do I alter the table definitions to perform casca

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 01:40

    You can do this with SQL Server Management Studio.

    → Right click the table design and go to Relationships and choose the foreign key on the left-side pane and in the right-side pane, expand the menu "INSERT and UPDATE specification" and select "Cascade" as Delete Rule.

    SQL Server Management Studio

提交回复
热议问题