17,086
社区成员
发帖
与我相关
我的任务
分享
--建立测试环境
create table test(guarno varchar(10) );
insert into test select '0101' from dual ;
insert into test select '0102' from dual ;
insert into test select '0103' from dual ;
insert into test select '0104' from dual ;
--测试语句
select *from test
where '~0101~0102~' like '%~'||guarno||'~%';
--清除测试环境
drop table test;
/*--测试结果
GUARNO
0101
0102
*/
select * from guarfile where '~272~273~' like '%~'||guarno||'~%'
declare str varchar2(10) :='1,2';
begin
select id, idname, type from t_20081028 where id in (str);
end;