首页 > 代码库 > 三个表做联合查询

三个表做联合查询

/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000 [lz_UsersId]
,[lz_UsersName]
,[lz_EmpName]
,uj.jobId
,j.name
FROM [lcfw].[dbo].[LZ_Uesrs] as u left join [UserJob] as uj on u.lz_UsersId = uj.userId left join [Lz_job] j on uj.jobId = j.id

三个表做联合查询