select col1,col2,col3……
from 
(select  *  from  tab where id in ('a','b''c')) t用视图也可以啊!

解决方案 »

  1.   

    跟我说的不是一个意思阿!我是要在集合('a','b','c')里,但是不在表里的那部分子集
      

  2.   

    我能想到的最笨的办法就是:select 'a' from dual union select 'b' from dual union select 'c' from dual minus select id from tab;还能有什么别的方法么?
      

  3.   


      select * from 
      (
       select 
            (case when 'a' not in (select a from qxjtest) then 'a' end) as a,
            (case when 'b' not in (select a from qxjtest) then 'b' end) as b,
            (case when 'c' not in (select a from qxjtest) then 'c' end) as c
       from dual
      ) a;