(
p_tname in varchar2 ,
result out sys_refcursor
)
as
begin
OPEN result FOR SELECT * FROM p_tname;
end;
错误提示:
Line # = 8 Column # = 19 Error Text = PL/SQL: SQL Statement ignored
Line # = 8 Column # = 33 Error Text = PL/SQL: ORA-00942: 表或视图不存在
------解决方案--------------------------------------------------------
-- 动态语句
... ...
is
stmt varchar2(1000);
begin
stmt:='select * from '
------解决方案--------------------------------------------------------
p_tname;
open result for stmt;
end;
/