萬盛學電腦網

 萬盛學電腦網 >> 數據庫 >> oracle教程 >> 在ORACLE的存儲過程中如何做簡單的動態查詢

在ORACLE的存儲過程中如何做簡單的動態查詢

 CREATE OR REPLACE procedure ZXM_SB_GZ_GET
(p_table in varchar2,
 p_name in varchar2,
 p_value in varchar2,
 outpara out lntxdba.zxm_pag_cs_power.c_type
 )
as
begin
declare
wherevalue varchar2(200);
begin
wherevalue:=@#select * from @#||p_table||@# where @#||p_name||@#=@#||p_value;
open outpara for
wherevalue;
end;
end;
copyright © 萬盛學電腦網 all rights reserved