I got this store SP declare @tempstock2 as INT UPDATE T_Product_Option SET stock = (T_Product_Option.stock - @Quant) WHERE ID = @OptionID /****** dont let stock be 0 for now *****/
select @tempstock2=stock from T_Product_Option WHERE ID = @OptionID IF @tempstock<0 UPDATE T_Product_Option SET stock = 1 WHERE ID = @OptionID
@tempstock is -2
but it does go into the if IF @tempstock<0 so it considers -2>0 ??