1.创建临时表
-- Create table create table CRTST.TEMP_POINTS_IDS ( ids NUMBER ); -- Add comments to the table comment on table CRTST.TEMP_POINTS_IDS is '临时表';
2.分割之后,存入临时表
--in_pid为入参变量,格式为用逗号拼接而成的字符串 --切割之后,存入临时表中 insert into TEMP_POINTS_IDS (ids) SELECT REGEXP_SUBSTR(in_pid, '[^,]+', 1, rownum) FROM DUAL CONNECT BY rownum <= (length(in_pid) - LENGTH(REPLACE(in_pid, ',', '')) + 1);
3.在存储过程中,清空临时表中的数据
--清空临时表中的数据 execute immediate 'truncate table TEMP_POINTS_IDS';