标签:
创建包:
create or replace package p_view_param is
function set_param(num number) return number;
function get_param return number;
end p_view_param;
实现包体:
create or replace package body p_view_param is
paramValue number;
function set_param(num number) return number is
begin
paramValue:=num;
return num;
end;
function get_param return number is
begin
return paramValue;
end;
end p_view_param;
创建视图:
create or replace view v_wms_inventory as
select MATERIAL_NO from WMS_INVENTORY@SSL_DB WHERE quantity=p_view_param.get_param()
查询SQL:
select * from v_wms_inventory where p_view_param.set_param(3050)=3050;
标签:
原文地址:http://www.cnblogs.com/sddychj/p/5620904.html