-- https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/REFTOHEX.html
CREATE TABLE warehouse_table OF warehouse_typ
   (PRIMARY KEY (warehouse_id));
CREATE TABLE location_table
   (location_number NUMBER, building REF warehouse_typ 
   SCOPE IS warehouse_table);
INSERT INTO warehouse_table VALUES (1, 'Downtown', 99);
INSERT INTO location_table SELECT 10, REF(w) FROM warehouse_table w;
SELECT REFTOHEX(building) FROM location_table;