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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc

3579


What is the purpose of normalization?

750


what is heap table? : Sql dba

801


what is the difference between cluster and non cluster index? : Sql dba

730


What is difference between sql and mysql?

748






How do you sort in sql?

774


Which are the different character-manipulation functions in sql?

719


What are hotfixes and patches?

689


what is the syntax used for partition in tsql? : Transact sql

729


what happens if null values are involved in expressions? : Sql dba

734


What is a design view?

700


What is embedded sql with example?

753


What is the difference between rename and alias?

971


What is the maximum size of sqlite database?

726


What is primary key and foreign key with example?

683