Oracle 常用函数

Oracle-Sql语句资料oracle+110个常用函数经典SQL语句大全.zip Oracle_Sql语句资料oracle+110个常用函数经典SQL语句大全,可供学习参考。 立即下载

oracle 常用功能函数汇总********************

*******************************************************************************
* SQL Group Functions (num can be a column or expression)                     *
(null values are ignored, default between distinct and all is all)            *
*******************************************************************************
AVG([distinct or all] num)      -- average value
COUNT(distinct or all] num)     -- number of values
MAX([distinct or all] num)      -- maximum value
MAX([distinct or all] num)      -- minimum value
STDDEV([distinct or all] num)   -- standard deviation
SUM([distinct or all] num)      -- sum of values
VARIANCE([distinct or all] num) -- variance of values
  
*******************************************************************************
* Miscellaneaous Functions :                                                  *
*******************************************************************************
DECODE(expr, srch1, return1 [,srch2, return2...], default]
       -- if no search matches the expression then the default is returned,
       -- otherwise, the first search that matches will cause
       -- the corresponding return value to be returned
DUMP(column_name [,fmt [,start_pos [, length]]])
      -- returns an internal oracle format, used for getting info about a column
      -- format options : 8 = octal, 10 = decimel, 16 = hex, 17 = characters
      -- return type codes : 1 = varchar2, 2 = number, 8 = long, 12 = date,
      --   23 = raw, 24 = long raw, 69 = rowid, 96 = char, 106 = mlslabel
GREATEST(expr [,expr2 [, expr3...]]
      -- returns the largest value of all expressions
LEAST(expr [,expr2 [, expr3...]]
      -- returns the smallest value of all expressions
NVL(expr1 ,expr2
      -- if expr1 is not null, it is returned, otherwise expr2 is returned
SQLCODE
      -- returns sql error code of last error.  Can not be used directly in query,
      -- value must be set to local variable first
SQLERRM
      -- returns sql error message of last error.  Can not be used directly in query,
      -- value must be set to local variable first
UID
      -- returns the user id of the user you are logged on as
      -- useful in selecting information from low level sys tables
USER
      -- returns the user name of the user you are logged on as
USERENV('option')
      -- returns information about the user you are logged on as
      -- options : ENTRYID, SESSIONID, TERMINAL, LANGUAGE, LABEL, OSDBA
      --           (all options not available in all Oracle versions)
VSIZE(expr)
      -- returns the number of bytes used by the expression
      -- useful in selecting information about table space requirements
  
*******************************************************************************
* SQL Date Functions (dt represents oracle date and time)                     *
* (functions return an oracle date unless otherwise specified)                *
*******************************************************************************
ADD_MONTHS(dt, num)      -- adds num months to dt (num can be negative)
LAST_DAY(dt)             -- last day of month in month containing dt
MONTHS_BETWEEN(dt1, dt2) -- returns fractional value of months between dt1, dt2
NEW_TIME(dt, tz1, tz2)   -- dt = date in time zone 1, returns date in time zone 2
NEXT_DAY(dt, str)        -- date of first (str) after dt (str = 'Monday', etc..)
SYSDATE                  -- present system date
ROUND(dt [,fmt]          -- rounds dt as specified by format fmt
TRUNC(dt [,fmt]          -- truncates dt as specified by format fmt
  
*******************************************************************************
* Number Functions :                                                          *
*******************************************************************************
ABS(num)             -- absolute value of num
CEIL(num)            -- smallest integer > or = num
COS(num)             -- cosine(num), num in radians
COSH(num)            -- hyperbolic cosine(num)
EXP(num)             -- e raised to the num power
FLOOR(num)           -- largest integer < or = num
LN(num)              -- natural logarithm of num
LOG(num2, num1)      -- logarithm base num2 of num1
MOD(num2, num1)      -- remainder of num2 / num1
POWER(num2, num1)    -- num2 raised to the num1 power
ROUND(num1 [,num2]   -- num1 rounded to num2 decimel places (default 0)
SIGN(num)            -- sign of num * 1, 0 if num = 0
SIN(num)             -- sin(num), num in radians
SINH(num)            -- hyperbolic sine(num)
SQRT(num)            -- square root of num
TAN(num)             -- tangent(num), num in radians
TANH(num)            -- hyperbolic tangent(num)
TRUNC(num1 [,num2]   -- truncate num1 to num2 decimel places (default 0)
  
*******************************************************************************
* String Functions, String Result :                                           *
*******************************************************************************
(num)                   -- ASCII character for num
CHR(num)                -- ASCII character for num
CONCAT(str1, str2)      -- str1 concatenated with str2 (same as str1||str2)
INITCAP(str)            -- capitalize first letter of each word in str
LOWER(str)              -- str with all letters in lowercase
LPAD(str1, num [,str2]) -- left pad str1 to length num with str2 (default spaces)
LTRIM(str [,set])       -- remove set from left side of str (default spaces)
NLS_INITCAP(str [,nls_val]) -- same as initcap for different languages
NLS_LOWER(str [,nls_val])   -- same as lower for different languages
REPLACE(str1, str2 [,str3]) -- replaces str2 with str3 in str1
                             -- deletes str2 from str1 if str3 is omitted
RPAD(str1, num [,str2])     -- right pad str1 to length num with str2 (default spaces)
RTRIM(str [,set])           -- remove set from right side of str (default spaces)
SOUNDEX(str)                -- phonetic representation of str
SUBSTR(str, num2 [,num1])   -- substring of str, starting with num2,
                             -- num1 characters (to end of str if num1 is omitted)
SUBSTRB(str, num2 [,num1])  -- same as substr but num1, num2 expressed in bytes
TRANSLATE(str, set1, set2)  -- replaces set1 in str with set2
                             -- if set2 is longer than set1, it will be truncated
UPPER(str)                  -- str with all letters in 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

论文解读--Phase Noise in FMCW Radar Systems 相位噪声是现代雷达、通信、光谱和计量系统的基本性能参数之一。本文提出了一种适用于FMCW雷达系统的相位噪声理论。导出了一个新的设计方程,用于确定雷达系统中允许的源相位噪声电平的最大界。分析了在传输延迟小于参考振荡器相干时间时,相干混频引起的非线性相位噪声去相关函数;讨论了在传输延迟大于参考振荡器相干时间时,目标响应的频谱展宽。提出了收发链中各子系统的影响,并讨论了一种新的ADC相位噪声模型。介绍了相位噪声建模技术,然后将锁相环频率合成器与低噪声频率合成器进行比较,以演示减少相位噪声边带以改善检测和跟踪性能。 阅读详情

相关推荐

实例讲解Simulink CAN通讯丢失故障判定模型搭建及仿真测试验证方法

本文通过ABS通讯丢失故障触发、判定条件Simulink模型的搭建和仿真的讲解,介绍了一种控制器CAN通讯丢失故障判定的方法和建模方法,希望能给相关技术人员带来一定参考和帮助。

qq_43011586的博客 3685

oracle 常用功能函数汇总

******************************************************************************* * SQL Group Functions (num can be a column or expression)                     * (null values are ignored, default betwee

1919

大华事件检测智能服务器,大华股份:高速公路智能事件检测 解决方案

1方案背景随着我国基础设施建设的飞速发展,公路尤其是高速公路的总里程数年年攀升。交通运输部统计数据显示,截止2017年底全国公路总里程477.35万公里,其中高速公路13.65万公里,位居世界第一。高速公路的运营和管理作为全国交通管理的重要组成部分日益受到严峻挑战,交通拥堵和事故频发已成为高速公路上非常突出的问题。抛洒物、行人、车辆不规则行驶等事件是导致以上结果的重要原因。基于视频分析的高速公路智...

weixin_39523887的博客 1822

ORACLE函数大全

ORACLE函数大全(本人收藏)SQL中的单记录函数 1.ASCII 返回与指定的字符对应的十进制数; SQL> select ascii(A) A,ascii(a) a,ascii(0) zero,ascii( ) space from dual; A A ZERO SPACE --------- --------- --------- --------- 65 97 48 32

平民 961

Vue3集成百度实时语音识别

Vue3集成百度实时语音识别

weixin_61769998的博客 548

【ROS机器人系统】自主导航+YOLO目标检测+语音播报

完成自主导航功能,并在小车移动至指定地点的过程中,通过机器人的摄像头检测导航途中所见物体,识别出物体的种类(框选出不同物体并标注识别结果),结合科大讯飞语音合成模块对识别结果进行语音播报。..............................

南京大学软件工程硕士在读 2万+

Mybatis+Oracle总结

Mybatis调用Oracle的函数 mybatis调用Oracle的存储过程请参考我的另一篇博客 Oracle创建存储过程及在Mybatis中的调用 oracle函数结构 create or replace package body CPA_PROC_CPAF_BIR_SUM_ALL is function FN_CPA_CPAF_BIR_BASIC_INFO(REP_YEA...

李欢欢的博客 4105

最优化方法与数学建模

在本篇博客中,我们将探讨最优化方法在数学建模中的应用。首先,我们将介绍几种常见的最优化方法,如梯度下降、牛顿法和遗传算法。接着,我们将详细阐述这些方法的原理和算法。最后,我们将通过一个数学建模案例,展示如何使用Matlab实现这些方法。本文旨在为大家提供一个清晰的思路,以便更好地理解和应用最优化方法。

YOLO 439

oracle 中的函数ex,Oracle 最常用功能函数经典汇总

* SQL Group Function*s (num can be a column or expression)(null values are ign*ored, default between distinct and all is all)***************************************************************************...

weixin_33042659的博客 460

ISP算法:自动白平衡(AWB)

1. 为什么要做白平衡? 人类视觉系统具有颜色恒常性特点,一次人类对物体观察不受光源影响。但是Sensor在不同光线下,物体呈现的颜色不同,在晴朗天空下会偏蓝,在烛光下会偏红。如图: 2.什么是自动白平衡? 为了消除光源对于图像传感器成像的影响,模拟人类视觉系统的颜色恒常性。保证在任何场景下看到的白色是真正的白色。 3. 如何做自动白平衡? 只要乘以一个对角矩阵,便可以进行白平衡...

a200800170331的专栏 1万+

开源遥感语义分割工具箱mmsegmentation基于Lovedata数据集训练模型

开源遥感语义分割工具箱mmsegmentation基于Lovedata数据集训练模型

yilvyangguang520的博客 498

(7)<choose>、<when>、<otherwise>标签

MyBatis动态sql之choose、when、otherwise标签 有些时候不想用到所有的条件语句,而只想从中择取一二,针对这种情况,MyBatis 提供了 元素,它有点像 Java 中的 switch 语句。 <!--使用choose、when、otherwise元素根据条件动态查询用户信息--> <select id="selectUserByChoose" resultType="com.po.MyUser" parameterType= "com.po.MyUser"&gt

寒潭清 857

Labview邪修01:贪吃蛇小游戏

摘要:博主使用LabVIEW 2020(32位)复刻了经典贪吃蛇游戏。程序具备随机生成蛇(初始长度3)和食物、三档速度调节、键盘方向控制等功能,碰撞边界或自身即游戏结束。实现过程包括:1)界面设计,使用二维颜色盒数组构建游戏区,添加速度枚举控件和功能按钮;2)程序架构,采用模块化设计包含Main.vi、Start.vi等6个核心VI,分别处理初始化、位置计算、碰撞检测等逻辑;3)事件驱动机制,通过开始/结束事件、按键响应和超时循环实现游戏流程控制。运行时可实时显示分数,完整还原了贪吃蛇的核心玩法。

weixin_38637405的博客 970

110个oracle常用函数总结

nvl2 (expr1, expr2, expr3) ->expr1不为null,返回expr2;为null,返回expr3。nvl(expr1, expr2)->expr1为null,返回expr2;不为null,返回expr1。求最大值,all表示对所有的值求最大值,distinct表示对不同的值求最大值,相同的只取一次。求最小值,all表示对所有的值求最小值,distinct表示对不同的值求最小值,相同的只取一次。nullif (expr1, expr2) ->相等返回null,不等返回expr1。

m516387177的博客 1562

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

Oracle常用函数

Oracle常用函数:数学、日期和字符串

雷神乐乐的博客 2018

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

oracle有哪些常用函数,Oracle常用函数整理

点击关注上方“SQL数据库开发”,设为“置顶或星标”,第一时间送达干货之前已经给小伙伴们整理了SQL Server和Mysql的常用函数,还没有看的可以戳下面的链接:SQL Server常用函数整理MySQL常用函数整理今天再给大家分享一下Oracle的常用函数。1、字符函数字符函数接受字符参数,这些参数可以是表中的列,也可以是一个字符串表达式。常用的字符函数:ASCII(X)-...

weixin_39935654的博客 210

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

oracle常用函数,sybase常用函数

   oracle常用函数与sybase常用函数 比较:   oracle常用函数----------------------------------------------- SQL中的单记录函数 1.ASCII 返回与指定的字符对应的十进制数; SQL&gt; select ascii(’A’) A,ascii(’a’) a,ascii(’0’) zero,ascii(’...

五月天的博客 583

oracle中有哪些函数,Oracle有哪些常用函数?

Oracle常用函数:1、Substr 截取函数Select productid 产品编号,substr(productid,1,6) as 截取后的编号 from 表名 //查询产品编号从第一位开始的后6位2、Distinct 去除重复函数Select distinct(productid) 产品编号 from 表名 //查询产品编号去除重复的编号3、Order By 排序函数 asc(默认) ...

weixin_35615010的博客 680

ORACLE常用函数汇总

ORACLE常用函数汇总

weixin_55175040的博客 9142

mysql nvl函数_Oracle常用函数整理

点击关注上方“SQL数据库开发”,设为“置顶或星标”,第一时间送达干货之前已经给小伙伴们整理了SQL Server和Mysql的常用函数,还没有看的可以戳下面的链接:SQL Server常用函数整理MySQL常用函数整理今天再给大家分享一下Oracle的常用函数。1、字符函数字符函数接受字符参数,这些参数可以是表中的列,也可以是一个字符串表达式。常用的字符函数:ASCII(X)...

weixin_39654903的博客 895

oracle中的常用函数

oracle中的常用函数 1. 字符串常用函数 函数名说明 concat 用来连接字符串的函数,只能连接两个字符串。如果想连接多个字符串可以使用"||"符号 initcap 把每个单词的首字母大写。 instr(‘母字符串’,‘子字符串’) 母字符串:被查找的字符串。子字符串:要查找的字符串。 如果有第三个参数,代表从第几个字符开始查找。 第四个...

weixin_30247781的博客 106

oracle中常用函数大全

1、数值型常用函数 函数  返回值            样例           显示ceil(n) 大于或等于数值n的最小整数  select ceil(10.6) from dual; 11floor(n) 小于等于数值n的最大整数  select ceil(10.6) from dual; 10mod(m,n) m除以n的余数,若n=0,则返回m select mod(7,5) from ...

ruiguang21的博客 3万+

Oracle 常用函数的分类及示例

这些函数涵盖了 Oracle 中最常用的操作,能够满足大多数开发需求。将 ASCII 码转换为字符/返回字符的 ASCII 码。如果 expr1 为 NULL,则返回 expr2。返回 n 的 exponent 次幂。去除字符串两端的空格或指定字符。返回指定日期所在月的最后一天。返回字符串的长度(字符数)。左/右填充字符串到指定长度。返回子串在字符串中的位置。返回两个日期之间的月数差。返回当前系统日期和时间。将日期格式化为字符串。替换字符串中的子串。将字符串转换为日期。返回数值列的平均值。

GanKuRenSheng的博客 438
上一篇: 一些Java问题
下一篇: 应遵循的PL/SQL编码规则
pdcc
博客等级 码龄24年 0粉丝 17原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值