有一個column 1,2,3 我要按照column里面的值來輸出那列數據,3種情況 怎么解決 求大神 幫下忙
2 回答

藍山帝景
TA貢獻1843條經驗 獲得超7個贊
比如還有三個字段叫col1,col2,col3
1234 | select case when column =1 then col1 when column =2 then col2 when column =3 then col3 end from 表名 |
添加回答
舉報
0/150
提交
取消