Advertisement

07.23.2008 at 10:47AM PDT, ID: 23589471
[x]
Attachment Details

delete records from table with foreign  keys

Asked by cofactor in Oracle Database, PL / SQL

I have 3 tables .  the tables are connected with Foreign keys

I want to delete some records but as they are interconnected by foreign keys i have to delete all of the dependencies.

I want a query like below but this does not work

delete from tableA , tableB , tableC where tableA.w = tableB.m and tableB.r =tableC.s  AND tableA.y=5


i think this way i can remove the records from the above 3 tables which are connected by foreign keys

but that query is not correct .......can you  make my query correct ?Start Free Trial
 
 
[+][-]07.23.2008 at 10:49AM PDT, ID: 22071902

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.23.2008 at 10:55AM PDT, ID: 22071953

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.23.2008 at 11:14AM PDT, ID: 22072161

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.23.2008 at 11:29AM PDT, ID: 22072338

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Oracle Database, PL / SQL
Sign Up Now!
Solution Provided By: crxi
Participating Experts: 3
Solution Grade: B
 
 
[+][-]07.23.2008 at 06:29PM PDT, ID: 22075494

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.23.2008 at 10:15PM PDT, ID: 22076249

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.19.2008 at 08:07PM PDT, ID: 22265816

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628