Oracle Magazine, May/June 2019
Database Developer PL SQL Thats cumbersome irritating and as of Oracle Database Release 18c you and I dont have to bother with that sort of thing anymore Now any PL SQL value can be provided by a qualified expression just like a constructor ORACLE MAGAZINE MAY JUNE 2019 79 provides an abstract data type value PL SQL uses the terms qualified expression and aggregate rather than the SQL term type constructor but the functionality is the same Qualified expressions improve program clarity and developer productivity by providing the ability to declare and define a complex value in a compact form where the value is needed A qualified expression combines expression elements to create values of a RECORD type or associative array type both integer and string indexed Qualified expressions use an explicit type indication to provide the type of the qualified item This explicit indication is known as a typemark Ive put together a couple of Oracle Live SQL scripts to make it easy for you to play around with this great feature Qualified Expressions for Records aka record constructors Qualified Expressions for Associative Arrays aka collection constructors But hey as long as youre here lets go exploring QUALIFIED EXPRESSIONS FOR RECORDS USING POSITIONAL NOTATION This example uses positional notation to associate values with fields This means that each expression in the list is assigned to the field in the same position for example Savannah is assigned to habitat_ type DECLARE TYPE species_ rt IS RECORD species_ name VARCHAR2 100
You must have JavaScript enabled to view digital editions.