我有以下对象:
TYPE o_seat IS OBJECT
(
seat_id VARCHAR2 (8 BYTE),
seat_category_name VARCHAR2 (32 BYTE)
)
以及以下对象:
TYPE m_seats IS TABLE OF o_seat;
TYPE o_row IS OBJECT
(
row_no NUMBER (2, 0),
seats_array m_seats
)
我初始化对象:
v_row o_row := o_row (NULL,NULL);
如何在v_row中初始化seat_array?
答案 0 :(得分:0)
类似的东西:
o_row (12,m_seats(o_seat('x','y'),o_seat('y','z')) )
答案 1 :(得分:0)
DECLARE
v_row o_row := o_row (
'1',
m_seats(
o_seat('Seat1','Elite'),
o_seat('Seat2','Premium')
)
);
BEGIN
FOR I IN 1..v_row.seats_array.COUNT LOOP
DBMS_OUTPUT.PUT_LINE('Row :'||v_row.row_no||
' Seat: '||v_row.seats_array(I).seat_id||
' Category: '||v_row.seats_array(I).seat_category_name);
END LOOP;
END;
/