1. a.id 为字符串类型
select string_id from dual 的结果集为 1,2,3
直接写成
select * from table a where a.id in (select string_id from dual);
是不能查出数据的。
应用如下方式:
select * from table a
where INSTR(','||(select string_id from dual)||',' , ','||a.id||',')>0;
转载于:https://my.oschina.net/yzheng/blog/367495