Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

triggers before insert and row level.

Need to have real Before triggers and row level triggers. SQL doesn't have these triggers or sequences. They have "instead of" but not a real Before Trigger like enterprise level databases have. It's a real pain to program in SQL or to convert from Oracle or MySQL.

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    AdminMicrosoft SQL Server (Admin, Microsoft Azure) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    unplanned  ·  AdminMicrosoft SQL Server (Admin, Microsoft Azure) responded  · 

    Upvotes: 43

    <=-=Jul 3 2007 12:12AM=-=>

    BEFORE triggers are part of ANS SQL 99 (and 2003), and as such have been implemented by many manufacturers (Oracle, IBM).

    It’s time MS implemented ANS SQL.

    <=-=Jul 8 2007 5:49AM=-=>

    That request is for 3 features instead of one!
    1) I agree about Before Triggers
    2) Row triggers are easily done with SQL although with non ANSI syntax. But they are a bad practice, so low priority for me.
    3) Sequence would be nice eventually, but it is not a show stopper.

    <=-=Aug 13 2007 2:53PM=-=>

    Thank you for posting your request. We realize that BEFORE triggers are extremely useful, specifically in migration scenarios. Unfortunately, we are not able to provide this functionality in SQL Server 2008. We are considering it for a future release. Meanwhile, we suggest using INSTEAD OF triggers to achieve similar functionality.

    <=-=Aug 17 2007 1:01PM=-=>

    INSTEAD OF is not a workable replacement for BEFORE.

    Trigger support needs to be: one INSTEAD OF, or any number of BEFORE and AFTER with sequence control.

    <=-=Jul 16 2008 6:39AM=-=>

    I agree we need true BEFORE Triggers. Row level triggers, I would have to say NO, SQL is a SET based language

    <=-=Jul 16 2008 7:11AM=-=>

    Yes, it’s time for it

    <=-=Aug 6 2008 2:15PM=-=>

    Yes to BEFORE TRIGGERS, this is long overdue. Per row-triggers? Maybe they work well in Oracle,
    but I would suspect they would be a performance killer in SQL Server. So you need to rewrite those
    Oracle triggers anyway.

    <=-=Apr 2 2010 1:06AM=-=>

    As a business developer using Oracle with Microsoft development tools, MS SQL server lack of support for row-level triggers changes “migrate” to “re-write” and “maybe” to “no way” Like many small ISVs we would love to have the chance (time/money) to re-write all of our applications but re-write something that works well vs make new features or modules to our applications … its just bad business and you can go out of business thinking that way.

    <=-=Feb 7 2014 3:36PM=-=>

    I have been needing BEFORE TRIGGERS for a long time, too. We have some complex integrity constraints, and it would be a lot cleaner and more efficient to block an action than roll it back afterwards.

    <=-=Mar 17 2017 12:29PM=-=>

    Please see my “BEFORE TRIGGER Behavior with EXECUTE ORIGINAL_STATEMENT” topic.
    https://connect.microsoft.com/SQLServer/feedback/details/3127222/before-trigger-behavior-with-execute-original-statement

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base