select * from aaa where xx=xx;
select * from bbb where xx=xx;
这样不行吗?

解决方案 »

  1.   

    select * from aaa, bbb where aaa.id = bbb.id假设id为两个表的主键
      

  2.   

    to:DFlyingchen(弱水三千) 
    你理解错了,。我是说用关键字分别搜索2个表,将结果共同返回,并不是求他们的共同部分
    :)
      

  3.   

    $keyword="need word";select * from table1 t1,table2 t2 where t1.subject='$keyword' && t2.subject='$keyword'
      

  4.   

    $keyword="need word";select * from aaa t1,bbb t2 where t1.subject='$keyword' && t2.subject='$keyword'
      

  5.   

    select a.column1,b.column from a,b where a.colum=b.colu