Hi all,
Kindly consider the following block of code.
set SERVEROUTPUT ON size unlimited
declare
v1 number:=1;
v2 number:=2;
begin
if not (v1=2 and v2=2) then
dbms_output.put_line('condition met');
else
dbms_output.put_line('condition not met');
end if;
end;
/
After executing it i get the output as "condition met".
Can somebody pls explain why do i get the above output and how does NOT work as both the condition in the first IF are not satisfied
V1=1
V2=2
and the condition i have given is "if not (v1=2 and v2=2)" as V2 being 2 makes the first if condition not being met and should print the output in the else condition.
Thanks
Gautam