Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 trigger

Author  Topic 

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2009-09-11 : 07:57:00
hi iam having one trigger where on delete from one table it should insert into one more table where two tables iam specifying like a,b after delete on c.what i want is if one of column from c=9 it shoud insert in a but not in b.is itpossible? if the give me one example

Sachin.Nand

2937 Posts

Posted - 2009-09-11 : 08:12:15
Hv a look at Ouput Deleted clause.

PBUH
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-11 : 08:31:34
insert a
select * from deleted
insert b
select * from deleted where col<>9


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -