Hidden features in Oracle

2019-01-12 19:37发布

I enjoyed the answers and questions about hidden features in sql server

What can you tell us about Oracle?
Hidden tables, inner workings of ..., secret stored procs, package that has good utils...

21条回答
地球回转人心会变
2楼-- · 2019-01-12 20:10

WM_CONCAT for string aggregation

查看更多
爷、活的狠高调
3楼-- · 2019-01-12 20:12

@Peter

You can actually bind a variable of type "Cursor" in TOAD, then use it in your statement and it will display the results in the result grid.

exec open :cur for select * from dual;
查看更多
SAY GOODBYE
4楼-- · 2019-01-12 20:13

wm_concat works like the the MySql group_concat but it is undocumented.

with data:

-car-   -maker-
Corvette Chevy
Taurus   Ford
Impala   Chevy
Aveo     Chevy

select wm_concat(car) Cars, maker from cars
group by maker

gives you:

-Cars-                   -maker-
Corvette, Impala, Aveo   Chevy
Taurus                   Ford
查看更多
登录 后发表回答