Contents
  1. 1. 一、日期函数
  2. 2. 二、聚合函数

一、日期函数

  • mysql
1
2
str_to_date() 
select str_to_date('2008-4-2 15:3:28','%Y-%m-%d %H:%i:%s');
  • oracle
1
2
to_date()
select to_date('2005-01-01 13:14:20','yyyy-MM-dd HH24:mm:ss') from dual;

二、聚合函数

  • mysql
1
2
group_concat()
select id,group_concat(name) from aa group by id;
  • oracle
1
2
3
4
wm_concat()
select aa,wmsys.wm_concat(t1.name) from (
select t.name,to_char(t.createdate,'yyyy-mm-dd') aa from td_user t where t.td_conference_id = 3218 and t.status = 1 and t.createdate > to_date('2012-10-28','yyyy-mm-dd') order by createdate desc
) t1 group by t1.aa
Contents
  1. 1. 一、日期函数
  2. 2. 二、聚合函数