ORACLE 存储过程中 SQL写法

ORACLE 存储过程中的 普通查询

普通查询

create or replace procedure namechange(res out sys_refcursor)
is

sqlstr varchar2(500);
begin
sqlstr := 'select *  from baseinfobak';
open res for sqlstr;

end;

在sql-plus里调用该存储过程

declare
     res sys_refcursor;
begin
     namechange(res);
end;

猜你喜欢

转载自gamewong.iteye.com/blog/1633991