How do I drop all foreign-key constraints on a table in Sql Server 2000?

后端 未结 3 1709
孤独总比滥情好
孤独总比滥情好 2020-12-30 04:38

How do I drop all foreign-key constraints on a table in SQL Server 2000 using T-SQL?

3条回答
  •  一生所求
    2020-12-30 04:59

    I think you'll find that there is no easy way to drop constraints on a table in SQL Server 2000. That said, there are plenty of people who have written scripts that can identify and remove/disable/recreate foreign key constraints. One example is at http://www.mssqltips.com/tip.asp?tip=1376 - but I haven't tested it on SQL Server 2000.

    EDIT: Here is another example that generates drop/create scripts for you.

提交回复
热议问题