Monday, March 2, 2009

Boolean

Set Serveroutput On

Declare
v_Flag Boolean := False;

v_N1 Number(4):= &v_N1;
v_N2 Number(4):= &v_N2;

Begin

v_Flag := v_N1 > v_N2;

If v_Flag = True
Then Dbms_Output.Put_Line('Original v_Flag = True' );
Else Dbms_Output.Put_Line('Original v_Flag = False');
End If;

If v_Flag
Then Dbms_Output.Put_Line(v_N1|| ' > ' ||v_N2);
Else Dbms_Output.Put_Line(v_N1|| ' < ' ||v_N2);
End If;
End;
/

No comments:

Post a Comment