where c like '1%' 试试

解决方案 »

  1.   

    select a from tab_2 where c='1'
    ???我不太明白,这句话可以运行吗?
    TAB_2中没有a啊?
      

  2.   

    ...
    where a in(select a from tab_2 where c='1');表TAB_2中没有COLUMN A,所以系统会从表TAB_1中取,而TAB_1.A总是在TAB_1.A中的.
      

  3.   

    哇,弱水又来了,受教。
    不过弱水,为什么ORACLE这样做,好像很混乱。
    比如这种情况下,实际满足条件的TAB_2的记录只有1条,那么select a from tab_2 where c='1'会返回几条记录?
      

  4.   

    funangel(风萧萧) 你是不是说,tab_2确实没有a。
    弱水:
    我是想问,select 'a' from tab_2 where c='1'会返回一行记录'a';
    那么select a from tab_2 where c='1'真的会返回两行记录吗?
    这样就等价于select a from tab_1 where c='1'了
      

  5.   

    select a from tab_2 where c='1'
    会返回一条纪录,
    实际上在这个子查询,A是作为一个常量来处理的,当查询TAB_1中A=1这行的时候,子查询相当于select '1' from tab_2 where c='1',...