Solved

Constraints

Posted on 2011-02-17
2
388 Views
Last Modified: 2012-06-21
If I want to delete rows from a table, can I just disable the constraints, delete the rows, and then enable the constraints or do I have to remove rows from 15 child tables first?
0
Comment
Question by:msimons4
2 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 34916297
You can do either.  

I suggest NOT disabling constraints unless you absolutely have to.  When disabled, 'bad' data might sneak in from others doing inserts.
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 34916398
if you have cascading deletes, you might not need to do anything special.

simply delete the parent and the children will update or delete accordingly
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

707 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

12 Experts available now in Live!

Get 1:1 Help Now