有两表a和b,前两字段完全相同:(id int,name varchar(10)...)
id          name      
----------- ----------
1           a         
2           b         
3           c      


以下的查询语句,你知道它的运行结果吗?:
1.
select * from a left join b on a.id=b.id where a.id=1
2.
select * from a left join b on a.id=b.id and a.id=1
3.
select * from a left join b on a.id=b.id and b.id=1
4.
select * from a left join b on a.id=1


结果:
id          name        id          name       
----------- ----------- ----------- -----------
1           10          1           10

posted on 2007-12-29 14:03  恩恩爸爸  阅读(684)  评论(0编辑  收藏  举报