Hi I am creating four tables :
event (ecode, edesc, elocation, edate, etime, emax)
spectator (sno, sname, semail)
ticket (tno, ecode, sno)
cancel (tno, ecode, sno, cdate, cuser)
I have set ecode as PRIMARY KEY for event and tno for Ticket and sno for Spectator.
I added delete cascade in ticket for ecode and sno but it works fine with sno, that is when i delete a spectator the attribute is deleted from the child table too but the same is not happening with event:
CREATE TABLE ticket (
tno INT NOT NULL,
ecode CHAR(4) NOT NULL,
sno INTEGER NOT NULL,
CONSTRAINT ticket_pk PRIMARY KEY (tno),
FOREIGN KEY (ecode) REFERENCES event
ON DELETE CASCADE,
FOREIGN KEY (sno) REFERENCES spectator
ON DELETE CASCADE
);
What am i doing wrong?Please help
DB2 delete cascading not working
-
- Similar Topics
- Replies
- Views
- Last post
-
- 4
- 1360
-
by Jeff R
View the latest post
Fri Dec 30, 2022 8:51 pm
-
- 1
- 1425
-
by enrico-sorichetti
View the latest post
Wed Jun 16, 2021 10:26 pm
-
-
I can't get the LINK macro working properly
by chong_zhou » Fri Aug 21, 2020 10:53 pm » in Assembler - 13
- 7259
-
by steve-myers
View the latest post
Thu Aug 27, 2020 1:06 am
-
-
-
Micro mainframe transmission stopped working
by nightrider43 » Wed Apr 03, 2024 6:25 pm » in All Other Tools - 0
- 2934
-
by nightrider43
View the latest post
Wed Apr 03, 2024 6:25 pm
-
-
-
Compiler option INVDATA is not working on COBOL6.3
by Misha786 » Fri Apr 22, 2022 5:35 pm » in IBM Cobol - 4
- 3390
-
by Misha786
View the latest post
Mon Apr 25, 2022 4:35 pm
-