总之一句话,如果没有监听,别人就不会找到你。
因为不知道你的黑名单表名,所以我暂且认为黑名单表表名为black_list
得到在黑名单表中号码的存储过程如下:
create or replace procedure get_black_list(i_type in varchar2,
i_black_list in varchar2,
o_black_list out varchar2) is
cursor get_black_list_cur(t_type black_list.type%type,
t_black_list varchar2) is
select phone
from black_list
where type = t_type
and phone in (t_black_list)
v_phone black_list.phone%type
begin
o_black_list := NULL
for black_list_rec in get_black_list_cur(i_type, i_black_list) loop
v_phone := black_list_rec.phone
o_black_list := o_black_list || ',' || v_phone
end loop
if o_black_list is not null then
o_black_list := substr(o_black_list, 2, length(o_black_list))
end if
end get_black_list
得到不在黑名单表的存储过程如下
create or replace procedure get_black_list(i_type in varchar2,
i_black_list in varchar2,
o_black_list out varchar2) is
cursor get_black_list_cur(t_type black_list.type%type,
t_black_list varchar2) is
select phone
from black_list
where type = t_type
and phone not in (t_black_list)
v_phone black_list.phone%type
begin
o_black_list := NULL
for black_list_rec in get_black_list_cur(i_type, i_black_list) loop
v_phone := black_list_rec.phone
o_black_list := o_black_list || ',' || v_phone
end loop
if o_black_list is not null then
o_black_list := substr(o_black_list, 2, length(o_black_list))
end if
end get_black_list
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)