what is difference between pass by value and eference by
value in oracle plsql
Answer Posted / welcomeashwin
PASS-BY-VALUE(FUNCTION)
1)All parameters must be write-only using the IN mode
2)Parameters are locally scoped that cannot be changed
3)Any parameters can use any valid SQL or PL/SQL datatype.
Only functions with parameter lists that use SQL datatypes
work with SQL statements.
4)Any IN parameter can have a default value
5)The formal return values can use any SQL or PL/SQL
datatype, but pipelined return tables must use SQL.
6)Any system cursor is not writeable and must be passed as a
IN parameter
PASS-BY-REFERENCE (FUNCTION)
1)You must have one parameter as read-only or read-write
2)All formal parameters are locally scoped variables that
you can change during operation inside the function
3)Any parameters can use any valid SQL or PL/SQL datatype.
Only functions with parameter lists that use SQL datatypes
work with SQL statements.
4)Any IN parameter can have a default value
5)The formal return values can use any SQL or PL/SQL
datatype, but pipelined return tables must use SQL.
6)Any system cursor is not writeable and must be passed as a
IN parameter
PASS-BY-VALUE (PROCEDURE)
1)All parameters must be write-only using the IN mode
2)Parameters are locally scoped that cannot be changed
3)Any parameters can use any valid SQL or PL/SQL datatype.
4)Any IN parameter can have a default value
5)Any system cursor is not writeable and must be passed as a
IN parameter
PASS-BY-REFERENCE (PROCEDURE)
1)At least one parameter must be defined as read-only or
read-write.
2)Parameters are locally scoped that can be changed
3)Any parameters can use any valid SQL or PL/SQL datatype.
4)Any IN parameter can have a default value
5)Any system cursor is not writeable and must be passed as a
IN parameter
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is sql*loader and what is it used for?
what is offset-fetch filter in tsql? : Transact sql
How many developers work on postgresql?
Is it possible to create the following trigger: before or after update trigger for each row?
What is user in sql?
how is exception handling handled in mysql? : Sql dba
Is sql better than access?
What is a scalar value in sql?
How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000
Can we rollback truncate?
Why we use stored procedure instead of query?
what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba
what are all the common sql function? : Sql dba
How to use distinct and count in sql query? Explain
List the different type of joins?