进行左连接时,如果多于两个表该怎么办呀?

进行左连接时,如果多于两个表该怎么办呀?

sql语句如下:

slect t1.id,t1.name,t2.mtype,t3.mmodel from t2,t2,t3 where t1.mtypeid = t2.mtypeid and t1.mmodelid=t3.mmodelid;

现在因为t1.mtypeid,t1.mmodelid可能为 null,所以需要实行左连接或者右连接,请问各位大侠,这该怎么办呢!?

先谢谢了呀!      
[QUOTE]最初由 ssimyili 发布
[B]sql语句如下:

slect t1.id,t1.name,t2.mtype,t3.mmodel from t1,t2,t3 where t1.mtypeid = t2.mtypeid and t1.mmodelid=t3.mmodelid;

现在因为t1.mtypeid,t1.mmodelid可能为 null,所以需要实行左连接或者右连接,请问各位大侠,这该怎么办呢!?

先谢谢了呀! [/B][/QUOTE]

好了已经搞定了!方法如下:
slect t1.id,t1.name,t2.mtype,t3.mmodel from t1 left join t2 on t1.mtypeid = t2.mtypeid left join t3 on t1.mmodelid=t3.mmodelid