0
你好,我想是這樣的撂荒(不使用子查詢):用在一個表上的多個不同的領域有不同的條件選擇
select planName where period=1 as 1stPlan
select planName where period=2 as 2ndPlan
select planName where period=3 as 3ndPlan
...
FROM plan inner join project ON Project.Id=Plan.ProjectId
謝謝
考慮使用PIVOT:HTTP ://msdn.microsoft.com/en-us/library/ms177410.aspx –