Traditional Culture Encyclopedia - Weather forecast - When STCD=3728350 updates a piece of data, it will trigger an event: insert a piece of data at the same time, STCD=4 1820 100.

When STCD=3728350 updates a piece of data, it will trigger an event: insert a piece of data at the same time, STCD=4 1820 100.

Write triggers

Create a trigger in a date

On rwdb

Used to insert

be like

Declare @STCD int

Declare @tm date and time

declare @drp declare (5,2)

declare @intv decimal(5,2)

declare @pdr decimal(5,2)

Declare @ dypdecimal (5,2)

Declare @ withdecimal (5,2)

select @STCD =STCD,@tm=tm,@drp=drp,@intv=intv,@pdr=pdr,@dyp=day,@wth=wth from inserted

If @STCD =3728350

Insert rwdb value (4 1820 100, @tm, @drp, @intv, @pdr, @dyp, @wth).