declare @Table Table ( Value1 float, Value2 float, Total float ) Insert into @Table values (1,1) Insert into @Table values (2,2) Insert into @Table values (3,3) Insert into @Table values (4,4) Insert into @Table values (5,5)
create trigger trig_product on table after insert as declare @input varchar(25) set @input = (select distinct max(Total) from table) update table set Total = @input from table where ID=(select max(ID) from Table)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)