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

2024年11月29日 16: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