tailieunhanh - Oracle Built−in Packages- P96
Oracle Built−in Packages- P96: Ah, for the good old days of Version of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms , and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk object IN OUT ANY Parameters are summarized in the following table. Parameter Description reference The reference to the object object The value of the object selected from the database if supplied If you call LOCK_OBJECT and do not provide a second argument then the object will be locked but that object will not be returned to the calling program. This program effectively substitutes for the following type of SQL statement SELECT VALUE t INTO object FROM the_underlying_object_table t WHERE REF t reference FOR UPDATE In contrast to this SQL statement with LOCK_OBJECT you will not need to specify the name of the underlying database object table to retrieve the object. NOTE It is not necessary to lock an object before you update or delete it. By requesting a lock however you ensure that another session cannot even attempt to make changes to that same object until you commit or roll back. Restrictions Note the following restrictions on calling LOCK_OBJECT The program does not assert a purity level with the RESTRICT_REFERENCES pragma. You cannot call this program from within an SQL statement either directly or indirectly. The procedure Use the SELECT_OBJECT procedure to retrieve an object for a given reference. The header follows PROCEDURE reference IN REF ANY object IN OUT ANY Parameters are summarized in the following table. Parameter Description reference The reference to the object object The value of the object selected from the database This program effectively substitutes for the following type of SQL statement SELECT VALUE t INTO object FROM the_underlying_object_table t WHERE REF t reference UTL_REF Interface 466 Appendix A What s on the Companion Disk In contrast to this SQL statement with SELECT_OBJECT you will not need to specify the name of the underlying database object table to retrieve the object. Restrictions Note the following .
đang nạp các trang xem trước