ORACLE常用数值函数、转换函数、字符串函数介绍.docx.pdf
《ORACLE常用数值函数、转换函数、字符串函数介绍.docx.pdf》由会员分享,可在线阅读,更多相关《ORACLE常用数值函数、转换函数、字符串函数介绍.docx.pdf(7页珍藏版)》请在三一文库上搜索。
1、ORACLE USES numeric functions, transformation functions, and string functions? Numerical function: The absolute value of abs (m) m Mod m (n) m is the remainder of n Power (m, n) m to the n Round (m n) m four round the decimal point (n default is 0). Trunc (m n) m intercepts the value of n bits (n de
2、faults to 0) Character function: Initcap (st) returns st to capitalize the first letter of each word, all other letter lowercase Lower (st) returns st to all lowercase letters of each word Upper (st) returns st to capitalize the letters of each word Concat (stl, st2) returns st to st2 to the end of
3、stl (the available operator | |) The lpad (stl, n , st2) returns the right-aligned st, which is filled to the left of stl with st2 filling up until the length is n, and the default for st2 is space The rpad (stl, n , st2) returns the left aligned st, which is filled to the right of stl with st2 fill
4、ing up until the length is n, and the default of st2 is whitespace Ltrim (st , set) returns st, which removes the character from the set from the left until the first is not a character in the set. By default, it means space Rtrim (st , set) returns st, which removes the character from the set from
5、the right until the first is not a character in the set? By default, it means space Replace (st, search_st , replace_st) replaces the search_st with replace_st in st and returns a st. By default, delete search_st substr (st, m , n) n = the substring of the st string, starting at m and taking n chara
6、cters long. By default, you always return to the st end The length (st) value, which returns the number of characters in st Instr (stl, st2 , m , n) numeric, returns stl from the m character, st2 the NTH occurrence, the default value of m and nisi: 1 select initcap ( THOMAS ) from test; The initca i
7、nitca - 一一 一一 一一Thomas Thomas Select concat ( ABC def) first from test; First - -abcdef Select ABC | | | | def first “from test? First ABC def The select lpad (name, 10), the rpad (name, 5, *) from test; The lpad (name, 10) rpad (name, 5, *) -MMX MMX * abcdef abode Remove the dot and the word st and
8、 rd select rtrim (address, ? st rd ) from test Select name, replace (name, a, ) from test; Name, ,a, - great gre * t Select substr ( Archibald bearisol , 6, 9) a, substr ( Archibald bearisol 11) Bald bear bearisol Select name, instr (name, ) a, instr (name, , , 1, 2) b from test; Name a to b - - l i
9、 lei 3 0 I 1 1 2 4% Conversion function: NVL (m, n) if the m value is null, return n, otherwise the m is returned To_char (m , FMT) m from a numeric value converted to the specified format string FMT by default, the width of the FMT value just can accommodate all of the valid number to_number (st ,
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ORACLE 常用 数值 函数 转换 字符串 介绍 docx
链接地址:https://www.31doc.com/p-5616191.html