First question: Why should it be A? The referential action for the foreign key is not ON DELETE CASCADE. Thus, DB2 must not even attempt to delete the data in the child table. (C and D are out-of question anyway.)
You may want to read up on the concepts of constraints and referential actions. There are 5 defined in the SQL standard for ON UPDATE and ON DELETE (not all of which are fully implemented in DB2):
- RESTRICT - prevent update/delete if there are dependent rows
- NO ACTION - just do the update/delete, but the statement fails if there are dangling references after the data modification (the difference to RESTRICT is that triggers or whatever could adjust the references during statement execution)
- SET NULL - set value(s) in referencing column(s) to NULL, leaving orphans
- SET DEFAULT - set value(s) in referencing column(s) to the default value of each column; same as SET NULL if the default happens to be NULL
- CASCADE - delete/update the dependent records
Second question: The statement you quote is syntactically incorrect. The "TO" keyword cannot be used there. Besides, the CURRENT_USER special register cannot be updated:
http://publib.boulder.ibm.com/infoce...c/r0008404.htm
http://publib.boulder.ibm.com/infoce...c/r0011138.htm
http://publib.boulder.ibm.com/infoce...c/r0001016.htm
Third question: have a look at outer joins.
p.s: I highly recommend that you take some SQL classes before you attempt the certification. All your questions are about standard SQL stuff and every serious database course covers that. That would help you tremendously because you would only have to learn a few DB2-specific things additionally - the SQL part is mostly common across database systems from different vendors.