<<labele>>
declare
a=10
b=20,
begin
some statements
declare
a=30
c=40
end;
what is the A value in nested block?



<<labele>> declare a=10 b=20, begin some statements declare a=30 c=40 end; wh..

Answer / shekharjchandra

Please frame question correctly ...
Seems u r question is something like below

<<label>>
DECLARE
a NUMBER := 10 ;
b NUMBER := 20;
BEGIN
-- Some statement
NULL ;
DECLARE
a NUMBER := 30 ;
c NUMBER := 40 ;
BEGIN
-- Some statement
NULL ;
END ;
END ;
/


Obviously the value of a in nested block will be 30 (Check this topic in Scope and visibility in Oracle documentation)

regards
J

Is This Answer Correct ?    8 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is difference between left and right outer join?

0 Answers  


how to enter numeric values as hex numbers? : Sql dba

0 Answers  


what are the differences among rownum, rank and dense_rank? : Sql dba

0 Answers  


What is clustered index in sql?

0 Answers  


Mention what does the hierarchical profiler does?

0 Answers  






If the base table structure is changed what will happen to join index????

2 Answers  


Suppose I have to create a view on a table, that is not yet been created by DBA. I khow the table structure. Is it possible to create the view before DBA creates this table? If yes then how? Is it possible to create synonym in this way?

4 Answers   IBM, Metric Stream,


What is sql dialect?

0 Answers  


What are pl/sql cursors?

0 Answers  


What is the difference between inner join and outer join?

0 Answers  


i have one table with accounts and amounts as colums.accounts with columns c and d. and amounts with values 1000,2000,3000 for c and 4000,5000,8000 for d.i need to find the sum of these accounts c and d individually and find the differences between their sum using one select statement.

11 Answers   Ebix, Hewitt,


Which version of sql do I have?

0 Answers  


Categories