select table1.title,table1.content,table2.name from table1 join table2 on table1.id = table2.sid

解决方案 »

  1.   

    select table1.title,table1.content,table2.name from table1 table2 
    where table1.id = table2.sidorselect table1.title,table1.content,table2.name from table1 
    inner join table2 on table1.id = table2.sid
      

  2.   

    这只是取出对应的记录,检索后怎么根据检索结果取呢,也就是说,在table2中经过全文检索得到符合条件的记录,再取出对应table1中的记录,如果同时把相应的table1的记录也检索到了,又怎么去掉重复的
      

  3.   

    select a.title,a.content,b.name from table1 a,table b where a.id=b.id
      

  4.   

    select table1.title,table1.content,table2.name from table1 table2 
    where table1.id = table2.sid and CONTAINS(.....
      

  5.   

    这样写行吗?重复的记录会去掉吗?
    select table1.title,table1.content,table2.name from table1 
    inner join table2 on table1.id = table2.sid where contains(*,'关键字')
      

  6.   

    要不重复,只要保证派生的表2里的记录不重复。如:select table1.title,table1.content,tem.name from table1 
    inner join (select sid,name from table2 group by sid,name)tem on table1.id = tem.sid where contains(*,'关键字')
      

  7.   

    CONTAINS 或 FREETEXT 谓词只能在一个表上操作。请用表名来限定 * 的使用。
      

  8.   

    ok
    select table1.title,table1.content,table2.name from table1 
    inner join table2 on table1.id = table2.sid where contains(table1.*,'关键字') or contains(table2.*,'关键字') 给分