Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2006

    Question Unanswered: Casecade on delete/update


    I am working wiht SQL server and oracle for a softwar. For the client's need I need to work with Sybase also. I am confused cascade on delete and casecade on update is supported by Sybase? please help.

  2. #2
    Join Date
    Feb 2004

    Like in Oracle u can define at the time of table or constraint creation same way u can not do in syabse. But the alternate way to do the same thing using two special tables called Inserted and Deleted.

    Whenever there is any DML trigger fire on a table. The two special tables Inserted and Deleted automatically gets created.

    Say If any Insert trigger fire then

    The Inserted table will contain new row. This tables will have the same schema on which the trigeer fired and contain new row. So can check in the tigger code if the corresponding data does not exist then u first insert into master and then detail table. Same thning u can do it for updation/deletion.

    I case of update/delete trigger the Inserted table will have new record and Deleted table conatins old records.

    Hope this will help u.


Posting Permissions

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