我想将选定的结果用作新的列名。例如:
SELECT
[Table1].ID,
[Table1].OptionOneValue AS [Table2].OptionOneName,
[Table1].OptionTwoValue AS [Table2].OptionTwoName,
[Table1].OptionThreeValue AS [Table2].OptionThreeName,
FROM [Table1]
INNER JOIN [Table2] ON [Table1].ID = [Table2].ItemID
| ID | Screen Size | Cost | Service Date |
|:-----------|------------:|:------------:|:------------:|
| 1001 | 1920x1080 | NULL | 11-25-19 |
| 1002 | 2048×1080 | 400.00 | 11-26-19 |
| 1003 | NULL | NULL | 11-26-19 |
| 1004 | NULL | NULL | 11-27-19 |
| 1005 | 2048×1080 | 500.00 | 11-27-19 |
这将不起作用,它将引发语法错误。这是与我要问的问题最接近的另一个问题:Question