Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Constraints vs Indexes

Author  Topic 

Richard Branson
Yak Posting Veteran

84 Posts

Posted - 2005-10-14 : 07:19:05
Good day fellow code warriors

I'm trying to drop a table but i keep getting the following error: ERROR 3726, Could not drop the object because it is referenced by a FOREIGN KEY constraint. I don't have any constraint on the object and when I try to remove the index it throws out the following error: Error 3723, an explicit drop is not allowed on teh index... It is being usd for primary key constraint enforcement.

Any Ideas????

You can't teach an old mouse new clicks.

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2005-10-14 : 07:23:00
I'm guessing the foreign key constraint is on another table referencing the table you want to drop. Do sp_help <tableYouWantToDrop>. Among other things that will show you all tables referencing this table with FK constraints.

Be One with the Optimizer
TG
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-14 : 07:30:44
Also run this to get related tables

sp_fkeys 'yourTable'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -