你具体要实现的功能是什么? 
如果要保留两表的记录,就可
Select * from table1 as a 
  full outer join table2 as b 
  on a.table2_id=b.id好好看看连接关系

解决方案 »

  1.   

    下面这句能产生死循环?
    不相信!select * from table1,table2 where table1.table2_id=table2.id
    and table1.father_id=1000,
      

  2.   

    我想要的结果是:
    select * from table1,table2 where table1.table2_id=table2.id
    and table1.father_id=1000可是这样,在查询分析器中执行结果是:查询分析器不停地执行查询中......
    无法得到结果!!
      

  3.   

    说错了,感觉是像死循环,因为查询分析器的状态(执行这个sql语句查询)正在执行批查询,所以这样我的代码就是出现问题!!
      

  4.   

    select * from (select * from table1,table2 where table1.table2_id=table2.id) a
    where a.father_id=1000
    查询结果也一定为空啊,试试这个死吗
      

  5.   

    zsforever(虎虎) 
    谢谢,这样肯定可以为什么我的select * from table1,table2 where table1.table2_id=table2.id
    and table1.father_id=1000,
    会出现我的上述情况发生??
      

  6.   

    检查一下 father_id 的类型,属性,数据是否有特殊的情况,可能在比较father_id的时候出了问题