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 data abstraction in sql?
What are the different type of joins in sql?
Is natural join same as inner join?
Can sql function call stored procedure?
What is not equal in sql?
what is the difference between union and union all? : Sql dba
what are properties of a transaction? : Sql dba
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..
Which tcp/ip port does sql server run?
How do you optimize a query?
What is the maximum size of sqlite database?
What does select top 1 do in sql?
where are cookies actually stored on the hard disk? : Sql dba
Is sql considered coding?
How do you create a unique index?