DB2 Physical Delete Sequence

Grahame Elder

DB2 Physical Delete Sequence
I a parent table (P) has 3 child tables (C1), C2), (C3) all with
Foreign Key to PR with no cascade delete from parent to children
The parent row (PR) has 3 child rows (C1R), C2R), (C3R).

If the Parent row PR is attempted to be deleted before any children rows
and returns and sqlcode of -532 'dependent rows exist'.
Does anyone know the the sequence that DB2 will populate the SQLCA area
SQLERRMC ?
Will it be 'C1P' or 'C2P' or 'C3P' ?

What controls the sequence that DB2 will start checking the child
relationships for related children.

Grahame Elder
Ucla

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Walter Janißen

Re: DB2 Physical Delete Sequence
(in response to Grahame Elder)
Grahame

I am not sure, but I think, DB2 will check ist in the sequence of the
creation timestamp, the oldest first.

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm