作为Oracle开发工程师,推荐大伙看看 PIVOT and UNPIVOT Operators in Oracle Database 11g Release 1 This article shows how to use the new PIVOT and UNPIVOT operators in 11g, as well as giving a pre-11g solution to the same problems. PIVOT UNPIVOT Related articles. PIV…
Oracle中wm_concat()函数的使用 wm_concat()函数是oracle行列转换函数,该函数可以把列值以‘,’分割开来,并显示成一行. 1.原数据: 2.把结果分组以‘|’分隔,以一行打印出来 3.over(partition by )的用法 4.over(order by )的用法…
1. 字符函数 --upper(str), lower(str):将str转换成大,小写 select upper('hello') as x1, lower('HELlo') as x2 from dual; --initcap(str):将str中的每个单词的首字母大写,其他字母小写 select initcap('hELlo world!') as x from dual; --concat(str1, str2)或(str1 || str2):将str1和str2两个字符串连接成一个字符…
()--转换函数 --数字转换字符串 )||'分' from dual; ||'' from dual; ()--日期转字符串 select to_char(sysdate,'yyyy-mm-dd') from dual; select to_char(sysdate,'yyyy')||'年'||to_char(sysdate,'mm')||'月'||to_char(sysdate,'dd')||'日' from dual; select to_char(sysdate,'yyyy-mm-dd…