The Oracle PL/SQL MAKE_REF function generates a REF to an object instance, such as an object view or a row. It accepts an Object Table Name and an Object Identifier Id as parameters and returns a REF value. This is useful when creating object views.
- The object identifier in the object table must be primary key based.
- The MAKE_REF function applies an internal algorithm based on the supplied arguments to derive the REF. It does not read the supplied view to determine whether or not the object actually exists in the underlying table.
MAKE_REF (object_table, object_identifier_id);
Object Identifier Id is a unique id in the object table.
The SQL query below returns the REF for the object instance with ID=100 from the OBJ_PARTS table.
SELECT MAKE_REF(OBJ_PARTS, 100) FROM DUAL;