--Type CREATE OR REPLACE TYPE zh_concat_im AUTHID CURRENT_USER AS OBJECT ( CURR_STR clob, STATIC FUNCTION ODCIAGGREGATEINITIALIZE(SCTX IN OUT zh_concat_im) RETURN NUMBER, MEMBER FUNCTION ODCIAGGREGATEITERATE(SELF IN OUT zh_concat_im, P1 IN VARCHAR2)…
一.LISTAGG() 简介 介绍:其函数在Oracle 11g 版本中推出,对分组后的数据按照一定的排序进行字符串连接. 其中,“[,]”表示字符串连接的分隔符,如果选择使用[over (partition by )]则会使其变成分析函数: 用法1: SELECT aaa, listagg(bbb,',') within GROUP (ORDER BY aaa) FROM table GROUP BY aaa 用法2: SELECT aaa, listagg(bbb,',') within…
round()函数:四舍五入函数 传回一个数值,该数值按照指定精度进行四舍五入运算的结果. 语法:round(number[,decimals]) Number:待处理的函数 Decimals:精度,默认为0: Select round(123.456,0) as a,round(123.456,1) as b,round(123.456,-1) as c from dual;…
data 转为timstam可以函数to_timestamp的方式来转化 Select to_timestamp('2018-02-27 09:48:28','yyyy-mm-dd hh24:mi:ss.ff') From dual; select cast(to_timestamp('2011-09-14 12:52:42.123456789', 'syyyy-mm-dd hh24:mi:ss.ff') as date) timestamp_to_date from dual; --times…