declare d number(5);
begin
select nvl(clickcount,0) into d from tb_manager where ID=210;
if d>0 then
dbms_output.put_line(d);
else
dbms_output.put_line(d+1);
update TB_MANAGER set CLICKCOUNT = (d+1) where ID=210;
end if;
end;
begin
select nvl(clickcount,0) into d from tb_manager where ID=210;
if d>0 then
dbms_output.put_line(d);
else
dbms_output.put_line(d+1);
update TB_MANAGER set CLICKCOUNT = (d+1) where ID=210;
end if;
end;