Delete Functionality

  • Hi - Just wanted to ask of what would be a good implementation in deleting records from a certain table (lets say Table A). But with the following rules, Table A is referencing to Tables B,C,D, and E and so before deleting records from Table A we still need to delete records from Tables B,C,D, and E that are being reference from Table A.

    Any thoughts?

    Thanks,

    James.

  • Yes, you are correct. It would be better if you are going to delete like E,D,C,B and then A.

  • Yep but I was hoping I could see some sample implementation on how to do script for this one.

    Thanks.

  • If you really want to delete records from Table B, C, D & E after records on Table A are deleted; then you can define foreign key relations with ON DELETE CASCADE clause on Table A, B, C, D.

  • Thanks for the help guys, really appreciate it. I think the DELETE CASCADE would help.

    Thanks,

    James

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply