有 2 个数据库表,如下表 Table_1 和 Table_2。Table_1 列索引与 table_2 的 id 值匹配。Table_2 的名称值将作为查询结果的列标题。
Table_1
______________________________________________
| date |city_1 | city_2 | ... | city_100 |
|-----------|-------|-------------------------|
| 20.02.2013| 4 | 34 | ... | 222 |
| 21.02.2013| 3 | 10 | ... | 33 |
| ... | ... | ... | ... | ... |
|_____________________________________________|
Table_2
___________________
| id | name |
|-------|---------|
| 1 | newyork |
| 2 | london |
| ... | ... |
| 100 | istanbul|
|_________________|
预期结果如下
__________________________________________________________
| date | newyork | london | ... | istanbul |
|-----------|------------|------------|-------|-----------|
| 20.02.2013| 4 | 34 | ... | 222 |
| 21.02.2013| 3 | 10 | ... | 33 |
| ... | ... | ... | ... | ... |
|___________|____________|____________|_______|___________|
获取上述结果的 SQL 查询是什么?
谢谢