我想通過SQL服務器在下面輸出。在SQL服務器中選擇多行到列
表A
| Id | Name | 2016 | 2017 |
- - - - - - - - - - - - - - - -
| 1 | ABCDEFG | | |
| 2 | XYZLMON | | |
表B
| Id | Value | Year |
- - - - - - - - - - -
| 1 | F | 2016 |
| 1 | G | 2017 |
輸出
| Id | Name | 2016 | 2017 |
- - - - - - - - - - - - - - - -
| 1 | ABCDEFG | F | G |
| 2 | XYZLMON | | |
謝謝。這對我有用 – Parvin