select * from 
a , b
where a.sn = b.sn;能查出包含'a'的数据嘛?

解决方案 »

  1.   

    不一定能查出来啊
    只能查出a.sn = b.sn 的数据嘛
      

  2.   

    select t1.*,t2.* from a t1,bt2 where a.sn = b.sn
    and a.value1 like '%a%'
    这样吧
      

  3.   

    我也在找这个问题,不知道有没有什么好的办法解决,关联的表  例如
    select * from a,b,c,d where a.id=bi.id and a.id=c.id and a.id=d.id and a.name like '%li%'
    感觉就不能运行了!象这样怎么解决呀?
      

  4.   

    后面错了,where t1.sn=t2.sn and t1.value1 like '%a%'
      

  5.   

    a:
            SN VALUE1
    ---------- ----------   
             1 abc
             2 sdfbcb:    
            SN VALUE2
    ---------- ----------
             1 s
             2 tt--以以上两表为例查询得到:        SN VALUE1             SN VALUE2
    ---------- ---------- ---------- ----------
             1 abc                 1 s--我觉得应该符合要求了,为什么说不行呢?
      

  6.   

    试试这个
    select * from 
    a , b
    where a.sn = b.sn
    and a.value1 like '!%a%' escape '!'
      

  7.   

    不一定能查出来啊
    只能查出a.sn = b.sn 的数据嘛