Expression subqueries in IF statements

Adaptive Server Enterprise and Adaptive Server Anywhere support comparisons between a variable and a scalar value returned by an expression subquery. For example:

create procedure testIf ()
  begin
  declare var4 int;
set var4 = 10;
  if var4 = (select MIN (a_i1) from a) then set
  	var4 = 100;
end if;
end;