0
查詢的結果我想知道我怎麼能寫一個Oracle SQL命令顯示查詢結果,而不是爲:如何轉從Oracle數據庫
column_name1 column_name2 column_name3
result1_col1 result1_col2 result1_col3
result2_col1 result2_col2 result2_col3
...
而是:
column_name1 result1_col1 result2_col1 ...
column_name2 result1_col2 result2_col2 ...
column_name3 result1_col3 result2_col3 ...
?
我的oracle版本是11.1.0.7.0。
非常感謝!
PIVOT可以將特定數量的行轉變爲列。如果你不想知道最終的列數,你需要編寫代碼來編寫代碼(又名動態sql)。 – MatBailie
這是'PIVOT'所能做到的:http://www.oracle.com/technetwork/articles/sql/11g-pivot-097235.html – NullUserException
[Transpose select with Oracle](http:// stackoverflow。 com/questions/1788011/transpose-select-results-with-oracle) –