Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Trigger execution order

Trigger execution order

Scheduled Pinned Locked Moved Database
databasequestionannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    theJazzyBrain
    wrote on last edited by
    #1

    Suppose I have 3 or 4 triggers on a table for UPDATE. Is there a way to control the execution order of them?

    Jason Kataropoulos

    Excellence is not an act, but a habit!

    Aristotle

    P 1 Reply Last reply
    0
    • T theJazzyBrain

      Suppose I have 3 or 4 triggers on a table for UPDATE. Is there a way to control the execution order of them?

      Jason Kataropoulos

      Excellence is not an act, but a habit!

      Aristotle

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Not really, not on one table. I assume that you are talking about the same type of trigger here. If they are different trigger types, e.g. DELETE and INSERT, then they are fired based on the operation performed on the table. Why would you want to have multiple triggers fired anyway? I'm not sure I can see what benefit you would get out of this design.

      the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
      Deja View - the feeling that you've seen this post before.

      T 1 Reply Last reply
      0
      • P Pete OHanlon

        Not really, not on one table. I assume that you are talking about the same type of trigger here. If they are different trigger types, e.g. DELETE and INSERT, then they are fired based on the operation performed on the table. Why would you want to have multiple triggers fired anyway? I'm not sure I can see what benefit you would get out of this design.

        the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
        Deja View - the feeling that you've seen this post before.

        T Offline
        T Offline
        theJazzyBrain
        wrote on last edited by
        #3

        Because, ON UPDATE i need to do several different things on the table. some are logging things. some are denormalization for performance. some are maintenance issues... but I need then in certain order. I know, i stick them all in one trigger... But still, I was wondering if it could be done in 3 triggers

        Jason Kataropoulos

        Excellence is not an act, but a habit!

        Aristotle

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups