select custcode from testtbl where custcode in(select 函数名() as custcode  from dual)

解决方案 »

  1.   

    select XX from dual;只能返回一列的呢........
      

  2.   

    必须确保select 函数名() from dual 返回的是列,即要返回字符串--->'hb','bb'<---
      

  3.   

    函數隻能返回一個值的,'hb','bb'這兩個值時如何一起返回的呢?
      

  4.   

    如果樓主是把'hb','bb'作為一個字符串處理的話,就需要在IN後面將它拆分開
      

  5.   

    in 语句里面不能用变量来替代 'hb','dd'
    这样的意思是查询custcode=“'hb','d”的纪录可以这样:
    select  custcode  from  testtbl  where instr((select  函数名()  as  result    from  dual),custcode)>0;不过不是很严谨。
      

  6.   

    你把 as result  去掉