declare
l1 number := null;
l2 number :=null;
begin
if l1=l2 then message('equal');
else
if l1<>l2 then message('not equal');
else
message('else');
end if;
end if;
end;
What will be the output ?
Answer Posted / roopesh kumar
In term of oracle block should be like as........
SQL> declare
2 l1 number := null;
3 l2 number :=null;
4 begin
5 if l1=l2 then
6 dbms_output.put_line ('equal');
7 elsif l1<>l2 then
8 dbms_output.put_line ('not equal');
9 else
10 dbms_output.put_line ('else');
11 end if;
12 end;
13 /
else
PL/SQL procedure successfully completed.
Answer is as shown at end of block ELSE.
because u can't compare a null value to other null.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
what is an extent ? : Sql dba
What are the types of functions in sql?
What is pl sql code?
What is sql profiling in oracle?
What is blind sql injection?
Why do we use view in sql?
What is the use of & in pl sql?
How to get list of all tables from a database?
What is the use of sqlerrd 3?
What is error ora-01000: maximum open cursors exceeded
How do I remove duplicates in two columns?
What is sql procedures and functions?
What is ttitle and btitle?
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba
what is primary key? : Sql dba