我有以下代码:
DECLARE
TYPE rt_someDetails IS RECORD(
deny_discount VARCHAR2(4) DEFAULT 'NO');
TYPE someDetails_va IS VARRAY(2) OF rt_someDetails;
l_someDetails_va someDetails_va;
l_rt_someDetails rt_someDetails;
BEGIN
l_someDetails_va := someDetails_va();
l_someDetails_va.EXTEND;
-- when in varray, the default value doesn't show up
dbms_output.put_line('From array:: ' || l_someDetails_va(1).deny_discount);
-- However, when outside of varray, it works properly
dbms_output.put_line('Directly from record var:: ' || l_rt_someDetails.deny_discount);
END;
为什么deny_discount
从 varray 中的记录读取时没有显示默认值?