Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010
    Posts
    153

    Smile Unanswered: deleting table is possible?

    Hi, i have a doubt. I have a trigger (after insert, update) on table A from where i am inserting all the data into table B.

    After migration of data from table A to table B, all the records should get delete from the table A.

    In a single trigger, i have written logic for

    1) inserting data into table B.

    2)Deleting data from table A after migration.


    Everything is working fine. Now, my ques is, Will a trigger fail in future or is there any chances of fatal error in future if i am using insert and delete in the same trigger?

    Thank you

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    This is a weird use of a trigger, the sort of thing that sends shivers down my spine like expecting a monster to jump out of a closet during a horror movie...

    Do you have a unique index on your data?

    What the heck is the point of table A?
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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