Results 1 to 2 of 2

Thread: Delete script

  1. #1
    Join Date
    Jan 2009

    Unanswered: Delete script

    Hi Experts,

    I am having a customer linked to many tables like card,account,bank etc .How can i delete all the related data of a particular customer in single query?

    Can anyone pleasse give me some hint ?


  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    You cannot do it is a "single" statement--unless all of your RI is setup up to do it for you. You can however do it in an atomic block of statements:

    --Turn off autocommit if it is on
    Delete from all child tables in the proper order
    delete from parent table
    --Turn on autocommit if applicable


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts