<<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

hi sql gurus, here is my question 4 u. i wanna use triggers for sending reminder mail to all users who are registered to the site. if any one knws the code plz send me ans here : chayabs3@gmail.com thnx advance

1 Answers  


When to use inner join and left join?

0 Answers  


Is time a data type in sql?

0 Answers  


Determine if oracle date is on a weekend?

0 Answers  


Types of locks in database ?

8 Answers   HCL, TCS, Tieto,






What are different types of triggers?

0 Answers  


what is oracle sql,pl/sql with interfaces

2 Answers   TCS,


i have a table emp and columns ename,empno,mgr_id,i need ename,manager name as result i.e employee respective manager.. example empno ename mgr_id 1 john 3 2 paul 3 3 smith 1 4 kevin 1 5 stewart 2 result has to look like this ename manager john smith paul smith smith john kevin john stewart paul can u plz help me out in this.....

8 Answers  


What is set serveroutput on in pl sql?

0 Answers  


What does trigger mean in psychology?

0 Answers  


in materialized view the structure will create immediately or not?

2 Answers   iFlex,


i want insert 10 records from table a to table b. if i m using statement level trigger how many record insert ?in row level trigger how many record inserted???

3 Answers   Scope International,


Categories