ORACLE-数学和字符函数
来源:互联网 发布:淘宝联盟17年还赚钱吗 编辑:程序博客网 时间:2024/06/10 17:58
--数学函数
select ABS(-15) from dual; --返回绝对值
select mod(10,3) from dual; --返回余数
select round(145.2584,-1) from dual; --四舍五入
select trunc(123.45,-1) from dual; -- 截取数字
--字符函数
select ascii('A') from dual; -- 返回首字母的ASCII 码
select chr(65) from dual; -- 和ascii 相反
select length('你好') from dual; --返回字符串的长度
select length('sfd') from dual;
select SUBSTR('ABCDEFG',3,4) from dual; --字符截取
select CONCAT('你好','!')||'中国' from dual;
select upper('ac') from dual;
select lower('AC') FROM DUAL;
select INITCAP('the soap') from dual; --首字母大写
select instr('oracle traning','ra',3) instring from dual; -- instr() 返回一个字符串在另一个字符串出现的位置
select replace('this is a test','tes','resul') from dual; --替换函数
select rpad('gao',6, '*') from dual; --右边字符串填充
select lpad('ni',5,'**') from dual; --左边字符串填充
select rtrim('nihao '),ltrim(' 欢迎您') from dual; --去左边,右边空格
select ABS(-15) from dual; --返回绝对值
select mod(10,3) from dual; --返回余数
select round(145.2584,-1) from dual; --四舍五入
select trunc(123.45,-1) from dual; -- 截取数字
--字符函数
select ascii('A') from dual; -- 返回首字母的ASCII 码
select chr(65) from dual; -- 和ascii 相反
select length('你好') from dual; --返回字符串的长度
select length('sfd') from dual;
select SUBSTR('ABCDEFG',3,4) from dual; --字符截取
select CONCAT('你好','!')||'中国' from dual;
select upper('ac') from dual;
select lower('AC') FROM DUAL;
select INITCAP('the soap') from dual; --首字母大写
select instr('oracle traning','ra',3) instring from dual; -- instr() 返回一个字符串在另一个字符串出现的位置
select replace('this is a test','tes','resul') from dual; --替换函数
select rpad('gao',6, '*') from dual; --右边字符串填充
select lpad('ni',5,'**') from dual; --左边字符串填充
select rtrim('nihao '),ltrim(' 欢迎您') from dual; --去左边,右边空格
1 0
- ORACLE-数学和字符函数
- oracle的数学函数和聚合函数
- 数学函数、字符处理函数、字符串和内存操作函数
- SqlServer 和 Oracle 常用数学函数比较
- oracle数学函数
- Oracle 基本数学函数
- Oracle 数学函数
- Oracle数学函数
- oracle 数学函数
- oracle的数学函数
- Sql Server 2008 日期和时间函数、数学函数、字符传函数小结
- SQL Server和Oracle的常用数学函数对比
- SQLServer和Oracle的常用数学函数对比
- Oracle字符函数
- ORACLE 常用字符函数
- oracle(字符函数)
- oracle 字符函数
- Oracle字符函数
- .bat批处理文件的延迟环境变量扩展的概念
- HTML 5 视频
- This is my first blog
- 3.2常用技巧(一)
- 浅谈mysql主从复制的高可用解决方案
- ORACLE-数学和字符函数
- Android-DiskLruCache
- React.js深入学习详细解析
- 基于JQ的平滑滚动到顶部插件
- 凸包(Convex Hull)问题的三种解法: 暴力,Graham Scan,分治
- Codeforces 807C Success Rate 二分
- Android中的Handler的机制与用法详解
- Oracle11g中删除存储过程或者函数的用法
- 笔试题13. LeetCode OJ (13) Array Partition I