【发布时间】:2011-04-01 14:38:39
【问题描述】:
嗨
我有两个选择查询,我想将它们合并到一个具有 5 列的单个表中 Id, ClientId, Height, EyeColor, HairColor
查询是:
SELECT ClientCharacteristic.Id
, ClientCharacteristic.ClientId
, ClientCharacteristic.Height
, GeneralLookup.LookupItem as EyeColor
FROM dbo.ClientCharacteristic
INNER JOIN dbo.GeneralLookup
ON GeneralLookup.Id=ClientCharacteristic.glEyeColorId
SELECT ClientCharacteristic.Id
, ClientCharacteristic.ClientId
, ClientCharacteristic.Height
, GeneralLookup.LookupItem as HairColor
FROM dbo.ClientCharacteristic
INNER JOIN dbo.GeneralLookup
ON GeneralLookup.Id=ClientCharacteristic.glHairColorId
【问题讨论】: