Nest records, access the names of the nested records by using another component selector, or period
SQL>
SQL> DECLARE
2 TYPE full_name IS RECORD(first VARCHAR2(10 CHAR) := 'John',last VARCHAR2(10 CHAR):= 'Taylor');
3 TYPE demo_record_type IS RECORD(id NUMBER DEFAULT 1, contact FULL_NAME);
4 demo DEMO_RECORD_TYPE;
5 BEGIN
6 dbms_output.put_line('['||demo.id||']');
7 dbms_output.put_line('['||demo.contact.first||']['||demo.contact.last||']
8 END;
9 /
ERROR:
ORA-01756: quoted string not properly terminated
Related examples in the same category