Oracle Magazine, September/October 2018
Database Developer PL SQL In this articles example I want to move stock data from the stocks table to the tickers table so I need an object type that looks like the tickers table Ideally I would create a collection type like this CREATE TYPE tickers_ nt AS TABLE OF tickers ROWTYPE But ROWTYPE is a PL SQL declaration attribute and is not known to the SQL engine so this statement fails with PLS 00329 schema level type has illegal reference to TICKERS Instead I create an object type that mimics the structure of my table as follows ORACLE MAGAZINE SEPTEMBER OCTOBER 2018 53 CREATE TYPE ticker_ ot AUTHID DEFINER IS OBJECT ticker VARCHAR2 20 pricedate DATE pricetype VARCHAR2 1 price NUMBER I then create a nested table of those object types
You must have JavaScript enabled to view digital editions.