高級Oracle DBA,善長Linux系統維運以及Oracle數據庫管理,開發,調優. 具有多年PL/SQL開發經驗.
分类: Oracle
2007-12-03 10:49:56
In Java and other object-oriented languages, a method cannot assign
values to objects passed as arguments. When calling a method from SQL
or PL/SQL, to change the value of an argument, you must declare it as
an OUT
or IN OUT
parameter in the call specification. The corresponding Java parameter must be an array with only one element.
You can replace the element value with another Java object of the
appropriate type, or you can modify the value if the Java type permits.
Either way, the new value propagates back to the caller. For example,
you map a call specification OUT
parameter of the NUMBER
type to a Java parameter declared as float[] p
, and then assign a new value to p[0]
.
Note:
A function that declaresOUT
or IN
OUT
parameters cannot be called from SQL data manipulation language (DML) statements.
|