Hello,
I'm a newbie to SQL and if it is not to difficult I can succeed to write querie's. I don't much know about PL/SQL. We are working with Oracle.
The parent ERD is this.
Table 1 --> linking Table --> Table 2 --> Table 3(detail)
1 | 1 1 1 1 1 n
|--> Table 1 detail
1
Now I want to delete for every record of table 1 who doesn't have record in the table 1 detail table, delete these records.
But before I can do this I have to delete the one or more records in table 3, then in table 2 and then the records in the linking table and at last the records from Table 1.
Can anybody help or put me in a direction how to solve this?
Cascade doesn't work I think.
Linking table is I mean a table with only three UID's(Table 1, Table 3 and his self)
I mean by the numbers the relation between the tables.
Thanks in advance,
Nico
I'm a newbie to SQL and if it is not to difficult I can succeed to write querie's. I don't much know about PL/SQL. We are working with Oracle.
The parent ERD is this.
Table 1 --> linking Table --> Table 2 --> Table 3(detail)
1 | 1 1 1 1 1 n
|--> Table 1 detail
1
Now I want to delete for every record of table 1 who doesn't have record in the table 1 detail table, delete these records.
But before I can do this I have to delete the one or more records in table 3, then in table 2 and then the records in the linking table and at last the records from Table 1.
Can anybody help or put me in a direction how to solve this?
Cascade doesn't work I think.
Linking table is I mean a table with only three UID's(Table 1, Table 3 and his self)
I mean by the numbers the relation between the tables.
Thanks in advance,
Nico