Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    7

    Unanswered: Trigger Vs Stored procedure.....

    Could you pls Help me out with Difference between a trigger and Stored Procdure. I mean at an detailed level.

    Thanks,
    Eurek

  2. #2
    Join Date
    Nov 2003
    Location
    Germany
    Posts
    62
    Hi

    Well, I don't know if I can enumerate all the differences between triggers and stored procedure, but a few:

    Triggers are tied to a table as stored procedures are not. Triggers will be activated automatically by DB2 when this table is modified. For each action - delete, insert and update - a trigger has to be created.

    Stored procedures are called using the SQL-CALL-statement and a trigger can call a stored procedure.

    A stored procedure is nothing more than a subroutine, written in COBOL, C, PL1 or what else, which runs in a seperate address space, either in a db2 controlled or in a WLM managed one.

    I hope this gives you an impression what triggers are and what SPs are. They are totally different objects.

  3. #3
    Join Date
    Sep 2003
    Posts
    7

    thanks

    thank u very much Walter !!

Posting Permissions

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