DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: BEFORE UPDATE TRIGGER SQL SERVER 2000

  1. #1
    santosh Guest

    BEFORE UPDATE TRIGGER SQL SERVER 2000


    How to create a "BEFORE" UPDATE Trigger in SQL Server 2000

    TIA

  2. #2
    DaveSatz Guest

    Re: BEFORE UPDATE TRIGGER SQL SERVER 2000

    see BOL under CREATE TRIGGER

    something like this:

    create table x
    ( x int )
    go

    CREATE TRIGGER tu_x
    ON x INSTEAD OF UPDATE
    AS
    if @@rowcount = 0
    return
    go

    drop table x
    go
    --

    HTH,
    David Satz
    Principal Software Engineer
    Hyperion Solutions
    { SQL Server 2000 SP1/7.0 SP3/6.5 SP5a } { Cold Fusion 5/4.5.1 SP2 } { VSS }
    (Please reply to group only - emails answered rarely)
    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use.
    -----------------------------------------------------------------

    "santosh" <santosh@cyber-wizard.com> wrote in message
    news:3bbd694c$1@news.devx.com...
    >
    > How to create a "BEFORE" UPDATE Trigger in SQL Server 2000
    >
    > TIA




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center