xxxxxxxxxx
declare
a integer := 30;
b integer := 40;
begin
if (a>10) then
dbms_output.put_line(' a is greater than b');
else
dbms_output.put_line('a is greater than 10');
end if;
dbms_output.put_line('value of a : ' || a);
end;
xxxxxxxxxx
IF condition1 THEN
{statements to execute when condition1 is TRUE } ;
ELSIF condition2 THEN
{statements when condition1 is FALSE and condition2 is TRUE } ;
--it would jump to END IF
ELSIF condition3 THEN
{statements when condition1 ans 2 is FALSE and condition3 is TRUE..} ;
--it would jump to END IF
ELSE
{statements to execute when it comes here } ;
END IF;