Solved

how to disable foreign key constraints

Posted on 2007-03-22
1
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
kosturdur earned 250 total points
ID: 18776192
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
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.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

636 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