我声明了一个类型为:-
的表 TYPE LIST_OF_MASTER
IS
TABLE OF SUBS_INFO.MASTER%type;
I_MASTERS LIST_OF_MASTER;
然后我执行此查询并收到错误ORA-06502
:-
query1 := 'Select master from subs_info where region = ''' || INPUT_REGION || ''';
EXECUTE immediate (query1) bulk collect INTO I_MASTERS;
列SUBS_INFO.MASTER
的数据类型为varchar2(35 BYTE)
。
谢谢。
答案 0 :(得分:0)
您需要在末尾加上4个单引号:
query1 := 'Select master from subs_info where region = ''' || INPUT_REGION || '''';
看看我的示例 db <>小提琴here