Triggers in Sql server 2005

  • Can anybody help me in writing Triggers in sql server 2005. When I am writing triggers it is asking me to save the file to a location. where should I save them

    Thanks in advance

  • Hi,

    After writing a trigger in new query window Please press f5. Once you press f5 sql server will try to execute the code written in the query editor. As you are writing trigger it will create a trigger.

    Please refer http://technet.microsoft.com/en-us/library/ms189799(SQL.90).aspx

    for more information on triggers

    Thanks

    Chandra Mohan N

    [font="Verdana"]Thanks
    Chandra Mohan[/font]

  • It sounds like after you are writing the script with CREATE TRIGGER statement, you are using the menu or the tool bar to do save operation. This operation just saves the script out side of the database as a file, but it does not create the trigger in the database. In order to create the trigger you have to run the create trigger statement (just like you run any other SQL statements such as select statement).

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply