Welcome to Sign in | Help

Re: SQL Trigger

  •  02-26-2008, 11:18 AM

    Re: SQL Trigger

    Vrei sa modifici datele din tabel (---> INSERT, UPDATE, DELETE) sau si schema tabelului (---> ALTER TABLE)?

    Daca modifici doar datele, folosesti un trigger DML. In BOL (vezi "DML Triggers in the AdventureWorks Sample Database ") gasesti un exemplu apropiat de ceea ce vrei tu - atentie la rolul tabelelor "inserted" si "deleted".

    Pentru modificari de schema, vezi tot in AdventureWorks exemplul de trigger DDL "ddlDatabaseTriggerLog".

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems