转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 数据库 >> ORACLE >> 正文
Oracle 常用函数         ★★★★

Oracle 常用函数

作者:闵涛 文章来源:闵涛的学习笔记 点击数:1338 更新时间:2009/4/22 22:03:43
uppercase
  
*******************************************************************************
* String Functions, Numeric Result :                                          *
*******************************************************************************
  
ASCII(str)                        -- ASCII value of str
INSTR(str1, str2 [,num1 [,num2]]) -- position of num2th occurrence of
                                   -- str2 in str1, starting at num1
                                   -- (num1, num2 default to 1)
INSTRB(str1, str2 [,num1 [num2]]) -- same as instr, byte values for num1, num2
LENGTH(str)                       -- number of characters in str
LENGTHB(str)                      -- number of bytes in str
NLSSORT(str [,nls_val])           -- nls_val byte value of str
  
*******************************************************************************
* SQL Conversion Functions                                                    *
*******************************************************************************
CHARTOROWID(str)                   -- converts str to ROWID
CONVERT(str, chr_set2 [,chr_set1]) -- converts str to chr_set2
                                    -- chr_set1 default is the datbase character set
HEXTORAW(str)         -- converts hex string value to internal raw values
RAWTOHEX(raw_val)     -- converts raw hex value to hex string value
ROWIDTOCHAR(rowid)    -- converts rowid to 18 character string format
TO_CHAR(expr [,fmt])  -- converts expr(date or number) to format specified by fmt
TO_DATE(str [,fmt])   -- converts string to date
TO_MULTI_BYTE(str)    -- converts single byte string to multi byte string
TO_NUMBER(str [,fmt]) -- converts str to a number formatted by fmt
TO_SINGLE_BYTE(str)   -- converts multi byte string to single byte string
  
*******************************************************************************
* SQL Date Formats                                                            *
*******************************************************************************
  
BC, B.C.        BC indicator
AD, A.D.        AD indicator
CC, SCC         Century Code (SCC includes space or - sign)
YYYY, SYYYY     4 digit year (SYYYY includes space or - sign)
IYYY            4 digit ISO year
Y,YYY           4 digit year with comma
YYY, YY, or Y   last 3, 2, or 1 digit of year
YEAR, SYEAR     year spelled out (SYEAR includes space or - sign)
RR              last 2 digits of year in prior or next century
Q               quarter or year, 1 to 4
MM              month - from 01 to 12
MONTH           month spelled out
MON             month 3 letter abbreviation
RM              roman numeral for month
WW              week of year, 1 to 53
IW              ISO week of year, 1 to 52 or 1 to 53
W               week of month, 1 to 5 (week 1 begins 1st day of the month)
D               day of week, 1 to 7
DD              day of month, 1 to 31
DDD             day of year, 1 to 366
DAY             day of week spelled out, nine characters right padded
DY              day abbreviation
J               # of days since Jan 1, 4712 BC
HH, HH12        hour of day, 1 to 12
HH24            hour of day, 0 to 23
MI              minute of hour, 0 to 59
SS              second of minute, 0 to 59
SSSSS           seconds past midnight, 0 to 86399
AM, A.M.        am indicator
PM, P.M.        pm indicator
any puctuation  punctuation between format items, as in ''''DD/MM/YY''''
any text        text between format items
TH              converts 1 to ''''1st'''', 2 to ''''2nd'''', and so on
SP              converts 1 to ''''one'''', 2 to ''''two'''', and so on
SPTH            converts 1 to ''''FIRST'''', 2 to ''''SECOND'''', and so on
FX              fill exact : uses exact pattern matching
FM              fill mode  : toggles suppression of blanks in output
  
*******************************************************************************

来自 http://www.oracle.com.cn/viewthread.php?tid=14850

上一页  [1] [2] 


[Web开发]PHP采集程序常用函数大全  [系统软件]EXP-00008: ORACLE error 904 encountered的解决方…
[常用软件]PB7 连接 Oracle 的配置方法  [Delphi程序]Delphi 常用函数
[Web开发]oracle Export and Import 简介  [Web开发]Asp.NET常用函数 (VB.net)
[Web开发]ADO访问Oracle结果集的心得  [Web开发]asp.net常用函数
[JAVA开发]JDBC+Hibernate将Blob数据写入Oracle  [JAVA开发]J2EE应用中与Oracle数据库的连接
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Sql Server  · MySql
    · Access  · ORACLE
    · SyBase  · 其他
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台