当前位置:网站首页>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方法

边栏推荐
- 分享|智慧环保-生态文明信息化解决方案(附PDF)
- metaRTC5.0编程之p2p网络穿透(stun)指南
- [microservices openfeign] openfeign quick start service invocation based on feign
- Docker安装Mysql5.7并开启binlog
- Steve Jobs' speech at Stanford University -- follow your heart
- If a programmer goes to prison, will he be assigned to write code?
- 改性三磷酸盐研究:Lumiprobe氨基-11-ddUTP
- Voltage mode and current mode control of switching power supply
- 8VC Venture Cup 2017 - Elimination Round D. PolandBall and Polygon
- PMP考试成绩多久出来?这些你务必知道!
猜你喜欢

Operation of simulated examination platform of G3 boiler water treatment recurrent training question bank in 2022

metaRTC5.0编程之p2p网络穿透(stun)指南

电源插座是如何传输电的?困扰小伙伴这么多年的简单问题

交流电和直流电的区别是什么?

Reactive dye research: lumiprobe af594 NHS ester, 5-isomer

如何做好水库大坝安全监测工作

改性三磷酸盐研究:Lumiprobe氨基-11-ddUTP

To batch add background pictures and color changing effects to videos

IP datagram sending and forwarding process

北斗三号短报文终端在大坝安全监测方案的应用
随机推荐
Share a powerful tool for factor Mining: genetic programming
Metartc5.0 API programming guide (I)
阴阳师页面
【无标题】drv8825步进电机驱动板子原理图
Operation of 2022 power cable judgment question simulation examination platform
IP datagram sending and forwarding process
Online yaml to JSON tool
When excel copies the contents of a row, the columns are separated by the tab "\t"
MCLK configuration of Qualcomm platform camera
JS text box loses focus to modify width text and symbols
[JVM] - memory partition in JVM
MySQL 45 talk | 05 explain the index in simple terms (Part 2)
DPDK 源码测试时性能下降问题
中小型水库大坝安全自动监测系统解决方案
【LeetCode】12、整数转罗马数字
二级造价工程师考试还没完?还有资格审核规定!
线条动画
jsp连接oracle实现登录注册(简单)
Simple usage of GSAP
8VC Venture Cup 2017 - Elimination Round D. PolandBall and Polygon