Solved

how to disable foreign key constraints

Posted on 2007-03-22
1
302 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore 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.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

830 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