左连接查询 select uGroup_IduGroup_NamelUser_IdlPosition_Id from usergroup u left join (select * from UserGroupLink where User_Id=admin and company_id=) as l on uGroup_Id=lGroup_Id; as可以省略 注意写成以下这样就不可以了 select uGroup_IduGroup_NamelUser_IdlPosition_Id from usergroup u left join select * from (select * from UserGroupLink where User_Id=admin and company_id=) as l on uGroup_Id=lGroup_Id; |