摘要: 今天只讨论一种情况,那就是进行左外联时(Left Join)现在有两个表A(AID,BID,equal)(其中equal字段数据类型为:是/否) B(BID,name)单独对A表进行查询时,可以用:select * from A where equal=0或select * from A where equal=1进行查询当按B Left Join A进行查询时像这样:select B.BID,B.name,A.AID,A.equal from B Left join A on (B.BID=A.BID) where A.equal=0进行查询时,如果B表中有一条记录在A表中有其对应的记录,则 阅读全文
posted @ 2011-05-18 12:54 宝络 阅读(597) 评论(0) 推荐(0) 编辑