How to write insert trigger in sql server 2005? -
hello want create 1 insert trigger in have table
table hardwaremaster
hardwareid hardwarename quantity 1 hdd 5 , second table 2 ram 2
table transdetails
transid hardwareid 1 1 2 1 3 1 4 1 5 1 6 2 7 2
here want create trigger in once value come in hardwaremaster update table transdetails . how write trigger in
this can :
create trigger tr_ins_whatyouwant on hardwaremaster after insert declare @hardwareid int select @hardwareid = hardwareid inserted go insert dbo.transdetails (hardwareid) values (@hardwareid)
but suggest read before make trigger work :
Comments
Post a Comment