sp_drop_fkeys Procedure

The sp_drop_fkeys stored procedure can be used to drop foreign key constraints for a referenced table. The most common use is to drop all foreign key constraints referencing a table before it is dropped, because active foreign key references will prevent a drop from completing. sp_drop_fkeys cannot be used on SQL Server versions predating version 6.0 because the procedure works with the references constraint, which is part of the Declarative Referential Integrity (DRI) component introduced in version 6.0. References constraints define the foreign key relationships in a SQL Server database. sp_drop_fkeys is created as a stored procedure in the master database.