DB2常用函数与Oracle有什么不同
1个回答
展开全部
转化为字符串类型
Oracle: select to_char(15.5000) from dual; DB2: select char(15.5000) from sysibm.sysdummy1
转化为日期时间
Oracle: select to_date('2008-01-01','yyyy-mm-dd') from dual; DB2: select date('2008-01-01') from sysibm.sysdummy1
2、时间日期:year, quarter, month, week, day, hour, minute ,second
dayofyear(arg):返回arg在年内的天值
Dayofweek(arg):返回arg在周内的天值
Oracle: select to_char(15.5000) from dual; DB2: select char(15.5000) from sysibm.sysdummy1
转化为日期时间
Oracle: select to_date('2008-01-01','yyyy-mm-dd') from dual; DB2: select date('2008-01-01') from sysibm.sysdummy1
2、时间日期:year, quarter, month, week, day, hour, minute ,second
dayofyear(arg):返回arg在年内的天值
Dayofweek(arg):返回arg在周内的天值
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询