当前位置:网站首页>Oracle 常用基础函数
Oracle 常用基础函数
2022-06-28 05:21:00 【辕小白】
基础函数
- ABS函数 :取n的绝对值。
- CONCAT函数:字符串拼接,与||效果相同。
- INITCAP函数:将单词的首字母以大写的方式返回,其他小写。单词由空格、控制字符、标点符号限制
- INSTR 函数:查找l字符,首个l位于第3个位置。
- LENGTH 、LENGTHB函数:LENGTH 返回字符串的长度、LENGTHB 返回字节的长度。
- LPAD 函数:string 准备填充的字符串
- TRIM函数:移除字符串两侧的空白字符或其他预定义字符。
- REPLACE 函数:‘将要更改的字符串’,‘被替换掉的字符串’,’[替换字符串]’。
- TRUNC函数:TRUNC(NUMBER)表示截断数字,TRUNC(date)表示截断日期。
- 10.SUBSTR()函数:substr(字符串,截取开始位置,截取长度)。

union all函数使用
- Union:对两个结果集进行并集操作,不包括重复行,同时进行默认规则的排序;
- Union All:对两个结果集进行并集操作,包括重复行,不进行排序;
- union和union all的区别是,union会自动压缩多个结果集合中的重复结果,而union all则将所有的结果全部显示出来,不管是不是重复。Union All 速度比Union快。

oracle行转列、列转行
1.行转列
- 方法一:Oracle中的Pivot函数
- 方法二:聚合函数(max)结合decode函数
- 方法三:使用聚合函数(max)结合case when 函数
2.列转行
- 方法一:Oracle中的unpivot函数
- 方法二:使用union all方法

边栏推荐
- 北斗三号短报文终端在大坝安全监测方案的应用
- sqlmap工具使用手册
- Shutter nestedscrollview sliding folding head pull-down refresh effect
- JS text box loses focus to modify width text and symbols
- Simple usage of GSAP
- metaRTC5.0 API编程指南(一)
- jsp连接oracle实现登录注册(简单)
- PCR/qPCR研究:Lumiprobe丨dsGreen 用于实时 PCR
- 【C语言练习——打印空心正方形及其变形】
- Excel将一行的内容进行复制时,列与列之间是用制表符“\t”进行分隔的
猜你喜欢
![[Linux] - using xshell to install MySQL on Linux and realize the deployment of webapp](/img/07/e044a6ef14a6576dbee1c6a009ab4f.png)
[Linux] - using xshell to install MySQL on Linux and realize the deployment of webapp

Quartus replication IP core

【无标题】drv8825步进电机驱动板子原理图

Deeplearning ai-week1-quiz

What does mysql---where 1=1 mean

Store inventory management system source code

店铺进销存管理系统源码

Study on modified triphosphate: lumiprobe amino-11-ddutp

Sharing | intelligent environmental protection - ecological civilization informatization solution (PDF attached)

Feign implements path escape through custom annotations
随机推荐
JS中的链表(含leetcode例题)<持续更新~>
Biovendor sRAGE protein solution
JSP
2022 special operation certificate examination question bank and simulation examination for safety management personnel of fireworks and firecrackers business units
OpenSSL client programming: SSL session failure caused by an obscure function
How does the power outlet transmit electricity? Simple problems that have plagued my little friend for so many years
IP datagram sending and forwarding process
? How to write the position to output true
MySQL export query results to excel file
Sharing | intelligent environmental protection - ecological civilization informatization solution (PDF attached)
Docker安装Mysql5.7并开启binlog
SlicePlane的Heading角度与Math.atan2(y,x)的对应转换关系
How long will the PMP test results come out? You must know this!
Sqlmap tool user manual
[untitled] drv8825 stepping motor drive board schematic diagram
What are functions in C language? What is the difference between functions in programming and functions in mathematics? Understanding functions in programming languages
2022 high altitude installation, maintenance and removal examination questions and answers
【SkyWalking】一口气学完分布式链路追踪SkyWalking
Unity out ref params
Can wechat applets import the data in the cloud development database into makers with one click in the map component