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

边栏推荐
- Dart学习——函数、类
- [JVM series] JVM tuning
- Liuhaiping's mobile phone passes [[uiapplication sharedapplication] delegate] window. safeAreaInsets. The height of the bottom security zone is 0
- Jdbc的使用
- Redis 的 最新windows 版本 5.0.14
- How to learn programmable logic controller (PLC)?
- How to design an awesome high concurrency architecture from scratch (recommended Collection)
- Deeplearning ai-week1-quiz
- How high is the gold content of grade II cost engineer certificate? Just look at this
- 拉萨手风琴
猜你喜欢

Share a powerful tool for factor Mining: genetic programming

Excel将一行的内容进行复制时,列与列之间是用制表符“\t”进行分隔的

Don't roll! How to reproduce a paper with high quality?

拉萨手风琴

jsp连接oracle实现登录注册(简单)

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

Latest Windows version 5.0.14 of redis

Biovendor sRAGE protein solution

羧酸研究:Lumiprobe 磺基花青7二羧酸

How high is the gold content of grade II cost engineer certificate? Just look at this
随机推荐
Performance degradation during dpdk source code testing
Disable right-click, keyboard open console events
JSP
codeforces每日5题(均1700)
Leetcode 88: merge two ordered arrays
Liuhaiping's mobile phone passes [[uiapplication sharedapplication] delegate] window. safeAreaInsets. The height of the bottom security zone is 0
Docker installs mysql5.7 and starts binlog
Qcom LCD commissioning
OpenSSL client programming: SSL session failure caused by an obscure function
What is the difference between AC and DC?
mysql导出数据库字典成excel文件
CPG 固体支持物研究:Lumiprobe通用 CPG II 型
店铺进销存管理系统源码
交流电和直流电的区别是什么?
metaRTC5.0 API编程指南(一)
拉萨手风琴
Extjs图书管理系统源码 智能化图书管理系统源码
Opencv实现目标检测
WordPress zibll sub theme 6.4.1 happy version is free of authorization
Sorting out some topics of modern exchange principle MOOC