![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
oracle 函数大全
wokaozenmebuxing
这个作者很懒,什么都没留下…
展开
-
oracle 函数大全 之 substr
oracle的substr函数的用法 取得字符串中指定起始位置和长度的字符串 substr( string, start_position, [ length ] ) 如: substr('This is a test', 6, 2) would return 'is' substr('This is a test', 6) w转载 2012-07-18 12:56:48 · 853 阅读 · 0 评论 -
oracle 函数大全 之 next_day last_day
格式:NEXT_DAY(DATE,WEEKDAY) 即 NEXT_DAY(日期,星期几) NEXT_DAT函数返回输入日期开始,未来最近的指定星期对应的日期,直接写 '星期一' 例如:select next_day(sysdate,'星期一') from dual; 返回 当前时间之后的第一个星期一的时间(比如今天'7月18号0:01:01',星期三,则原创 2012-07-18 13:39:04 · 2166 阅读 · 0 评论 -
oracle 函数大全 之 coalesce
select empno,ename, sal, comm, coalesce(sal+comm, sal, 0) 总收入 from emp; 简单的说,就是考虑各种情况下的取值 通过解释上述语句,希望能帮你弄明白 coalesce(sal+comm, sal, 0)--------如果sal或者comm都不为空,就取值sal+comm, 如果有任意一个为空,就考虑第二个取值sal,此原创 2012-07-18 14:20:31 · 489 阅读 · 0 评论 -
oracle 函数大全 之 nvl() nvl2()
NVL( string1, replace_with) 功能:如果string1为NULL,则NVL函数返回replace_with的值,否则返回string1的值 通俗的说,就是给string创建默认值。如果string不为0,则是其本身,如果其为空,则赋值为replace_with 例如:select nvl(comm,0) from emp; 查出来的数据,原创 2012-07-18 13:51:38 · 682 阅读 · 0 评论 -
oracle 函数大全 之 内置函数大全(转载)
Oracle SQL 内置函数大全 SQL 中的单记录函数 1.ASCII 返回与指定的字符对应的十进制数; SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual; A a ZERO SPACE --------- ---------转载 2012-07-18 14:06:37 · 747 阅读 · 0 评论 -
oracle 函数大全 之 trunc round
--Oracle trunc()函数的用法主要有两种:做日期处理;做数字处理 ********************日期******************** 1.select trunc(sysdate) from dual --2012-7-18 今天的日期为2011-3-18 2.select trunc(sysdate, 'mm') from dual --原创 2012-07-18 13:20:03 · 461 阅读 · 0 评论