DB2 Child Table - Auto Delete With Parent

Posted by gamerzfuse on Stack Overflow See other posts from Stack Overflow or by gamerzfuse
Published on 2010-04-22T13:36:29Z Indexed on 2010/04/22 14:13 UTC
Read the original article Hit count: 237

Filed under:
|
|

I have a bit of a task before me. (DB2 Database) I need to create a table that will be a child table (is that what it is called in SQL?) I need it so that it has a foreign key constraint with my other table, so when the parent table is modified (record deleted) the child table also loses that record.

Once I have the table, I also need to populate it with the data from the other table (if there is an easy way to UPDATE this).

If you could point me in the right direction, this would help alot, as I do not even know what syntax to look for.

Thanks in advance

© Stack Overflow or respective owner

Related posts about db2

Related posts about sql