<<labele>>
declare
a=10
b=20,
begin
some statements
declare
a=30
c=40
end;
what is the A value in nested block?
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 |
What is a database? Explain
How to read/write files from pl/sql?
What are the different types of sql commands?
what are the different types of joins?
My select statement is not working as expected, So, to overcome from such issues what are the steps needed to be taken care?
What is primary key in db?
How do you declare a constant?
What is sql*loader and what is it used for?
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
Is record in oracle pl sql?
What is localdb mssqllocaldb?
can use the following like overloading concept in a single package: procedure p1(a varchar), procedure p1(a varchar2), procedure p1(a char)
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)