Solved

how to disable foreign key constraints

Posted on 2007-03-22
1
273 Views
Last Modified: 2010-03-19
I have two tables TEST_TABLE and TEST_TABLE_02. TEST_TABLE_02 having some foreign key constraints to TEST_TABLE. I want to drop TEST_TABLE because I want to make an int field an IDENTITY field. When I issue DROP TABLE TEST_TABLE, I get the following error

Could not drop object 'TEST_TABLE' because it is referenced by a FOREIGN KEY constraint.

I know I have to drop the constraints on the TEST_TABLE_02 for instane foreign key constraint but for some reason I do not want to do it.

Is it possible to disable constraints for a time being and later enable 'em.

Thanks in advance
0
Comment
Question by:rxraza
1 Comment
 
LVL 5

Accepted Solution

by:
kosturdur earned 250 total points
ID: 18776192
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now