select
tstamp,
if(val1 is null,@prevVal1,@prevVal1:=val1),
if(val2 is null,@prevVal2,@prevVal2:=val2)
from t;
Operator :=memberikan nilai ke variabel serta mengembalikan nilai tersebut.
select
tstamp,
if(val1 is null,@prevVal1,@prevVal1:=val1),
if(val2 is null,@prevVal2,@prevVal2:=val2)
from t;
Operator :=memberikan nilai ke variabel serta mengembalikan nilai tersebut.