Instead of doing:
select count(*) into l_count from mergetest where a = 1;
case l_count
when 0 then
insert into mergetest (a,b) values (1,1);
when 1 then
update mergetest set b = b + 1 where a = 1;
else
NULL;
end case;
I would like to get rid of the local variable l_count
and instead do:
case select count(*) from mergetest where a = 1;
...
Is this possible?