很感谢楼上的两位,DROP的问题解决了,但create的问题有来了.create or replace function TEMP_TABLE_CREATE return number as begin declare COUNT_FLAG number;BEGIN select COUNT(*) INTO COUNT_FLAG from all_tables where table_name='TEMP_TABLE';
IF COUNT_FLAG<>0 THEN execute immediate 'DROP TABLE TEMP_TABLE'; END IF
execute immediate 'create /drop table ...';
as
begin
declare COUNT_FLAG number;BEGIN
select COUNT(*)
INTO COUNT_FLAG
from all_tables
where table_name='TEMP_TABLE';
IF COUNT_FLAG<>0 THEN
execute immediate 'DROP TABLE TEMP_TABLE';
END IF
execute immediate ' CREATE TABLE TEMP_TABLE ( --此处出错
bkc_cd varchar2(20),
child_item_cd varchar2(20),
ecn_control_no varchar2(8),
beg_eff_dte number(8),
end_eff_dte number(8),
start_ecn_accum_qty number(11),
end_ecn_accum_qty number(11),
usage_dec number(13,7),
child_defect_pct number(5,2)
)';
END;
return SQLCODE;
end; 不知还要做何修改?
ORA-01031好象是权限不够.
ora-06512好象是表冲突了.
用存储过程创建表,os用户是否还需要具有“以批作业登录”的权限?晕倒n次.