我想获取Oracle对象的属性值。这是我的目标:
create type demo_obj as object( val1 number, val2 number, val3 number );
这是阵列:
create type demo_array as table of demo_obj;
我创建了一个这样的程序:
create or replace procedure proc_obj_demo ( obj_array DEMO_ARRAY )
as begin
FOR i IN 1..obj_array.COUNT
LOOP
INSERT INTO test_strings (s) VALUES (obj_array(i).demo_obj.val1); //here's the error
END LOOP;
end;
但是如何获取Oracle对象属性的值?
答案 0 :(得分:1)
将行更改为:
INSERT INTO test_strings (s) VALUES (obj_array(i).val1);