嗨,我想做的是:我有 2 张桌子,第一个是
Person Table
PID | Name | Surname | Area1 | Area2 | Area3 | OwnerID |
1 | John | Doe | 5 | 6 | 8 | 1 |
2 | Jack | Danniel | 8 | 2 | 4 | 2 |
第二个是
Area Table
AID | Value | Name | OwnerID |
1 | Java | Area1 | 1 |
2 | Orac | Area2 | 1 |
3 | Delp | Area1 | 2 |
4 | Css | Area3 | 1 |
如果我想选择 Owner1,如何查询这样的结果?
PID | Name | Surname | Java | Orac | Css | OwnerID |
1 | John | Doe | 5 | 6 | 8 | 1 |