如何一起查看这两个表的所有细节(在EmpID上合并)?
第一张表是:
SELECT [empid]
,[officeid]
,[desigindept]
,[apointdate]
,[joindtdept]
,[retdt]
,[basicpay]
,[logintobecreated]
,[SalarySlab]
,[ecode]
,[grad]
,[orderno]
,[flag]
,[Cadre]
,[type]
,[Appref]
,[otherstate]
,[otherReleInfo]
,[areaSelectionDate]
,[cadreAreaType]
,[pensionthrough]
FROM [ACRM].[dbo].[EmpInfoProfessionalMaster]
第二张表是:
SELECT [empid]
,[ecode]
,[Fname]
,[FHname]
,[mname]
,[lname]
,[dob]
,[sex]
,[ecast]
,[eimage]
,[relegion]
,[mstatus]
,[bloodgroup]
,[height]
,[idmark]
,[category]
,[hometown]
,[homestate]
,[nstation]
,[fingerprints]
,[lastOfficeId]
,[remarks]
,[flag]
,[DobAuth]
,[CasteAuth]
,[EmpSign]
,[PfAccountNo]
,[PANno]
FROM [ACRM].[dbo].[EmpInfoPersonalMaster]
答案 0 :(得分:1)
SELECT [empid]
,[officeid]
,[desigindept]
,[apointdate]
,[joindtdept]
,[retdt]
,[basicpay]
,[logintobecreated]
,[SalarySlab]
,[ecode]
,[grad]
,[orderno]
,[flag]
,[Cadre]
,[type]
,[Appref]
,[otherstate]
,[otherReleInfo]
,[areaSelectionDate]
,[cadreAreaType]
,[pensionthrough]
,[ecode]
,[Fname]
,[FHname]
,[mname]
,[lname]
,[dob]
,[sex]
,[ecast]
,[eimage]
,[relegion]
,[mstatus]
,[bloodgroup]
,[height]
,[idmark]
,[category]
,[hometown]
,[homestate]
,[nstation]
,[fingerprints]
,[lastOfficeId]
,[remarks]
,[flag]
,[DobAuth]
,[CasteAuth]
,[EmpSign]
,[PfAccountNo]
,[PANno]
FROM [ACRM].[dbo].[EmpInfoProfessionalMaster]
INNER JOIN [ACRM].[dbo].[EmpInfoPersonalMaster]
ON [ACRM].[dbo].[EmpInfoProfessionalMaster].[empid]=[ACRM].[dbo].[EmpInfoPersonalMaster].[empid]