sql-多表连接查询中,多加个条件怎么一并查询出来?

2024-11-29 16:29:29
推荐回答(2个)
回答(1):

selectDATEDIFF(f.appTime,f1.appTime) AS sjhoho,

a1.username,b1.orgname,a3.appTime leavetm ,a2.appTime overtm, from jiabansqd f ,f_attendApp f1,

pub_user a1 left join f_attendApp a3 on a1.userid=a3.userid left join jiabansqd a2 on a2.userid=a1.userid left join pub_org b1 on b1.orgid=a2.orgid=a3.orgid where a2.processInsStatus !=9

回答(2):

选择a.name,b.email其中a.fenleiid = 3和a.nameid = b.namid