通過Android/java在Sqlite中生成交叉表有什麼更好的選擇?Android sqlite Crosstab
我:
[TABLE people]
<i>_id, NAME
1, "mary"
2, "juan"
3, "jose"</i>
[TABLE GLASSES]
_id, COLOR
1, "BLACK"
2, "BLUE"
3, "GRAY"
4, "YELLOW"
...
[TABLE PEOPLE_GLASSES]
_id, idpeople, idglass, qty
1, 1, 1, 50
2, 1, 3, 30
3, 1, 4, 25
...
我需要:
[crosstab]
NAME | BLACK | GRAY | YELLOW
"mary" | 50 | 30 | 25
...
如何做到這一點?
清除你的問題的意圖... –
正是你想要的.. ???我想你想使用加入表,是嗎? –
No.連接不會將行轉換爲列 – AnselmoMS