oracle存储过程函数汇总().docx.pdf
《oracle存储过程函数汇总().docx.pdf》由会员分享,可在线阅读,更多相关《oracle存储过程函数汇总().docx.pdf(20页珍藏版)》请在三一文库上搜索。
1、oracle存储过程函数汇总 () Character function return character value These functions all received is the character parameter type group (except CHR) and returns the character value? In addition to the special instructions, the function returns VARCHAR2 most numerical types ? The restrictions on the return ty
2、pe of the character function are the same as those for the basic database type? The maximum value of character variable storage: The VARCHAR2 value is limited to 2000 characters (ORACLE 8 to 4000 characters) The CHAR value is limited to 255 characters (0RACLE8 2000) The long type is 2GB The Clob typ
3、e is 4GB 1,CHR Syntax: Chr (x) Function: return in the database character set with numerical equivalence with the character of X. CHR and ASCII are a pair of inverse functions? After CHR conversion character after ASCII conversion and obtained the original word Fu. Use location: process and SQL stat
4、ement? 2,CONCAT Syntax: CONCAT (stringl, string2) The function returns the stringl, and connected string2 behind. Use location: process and SQL statement? 3,INITCAP Syntax: INITCAP (string) Function: returns the first letter of each word in the string, uppercase, and the other letter in the word, lo
5、wercase string. The word is used? Spaces or alphanumeric characters to separate. Its not letter Character unchanged. Use location: process and SQL statement? 4,LTRIM Syntax: LTRIM (stringl, string2) Delete function: return counting from the left appears in the string2 character in stringl. String2 i
6、s set to a single blank by default? The database will scan stringl, starting from the left. When When the first character in string2, the results will be returned? LTRIM , s behavior is very similar to that of RTRIM. Use location: process and SQL statement? 5,NLS_INITCAP Syntax: NLS_INITCAP (stringt
7、, nlsparams) Function: returns the string, the first letter of each word capitalized, and the other words in the word, lowercase string, nlsparams The different sequenee is different from the default value of the specified session? If you do not specify a parameter, function and the same INITCAP ? N
8、lsparams can be used in the form of: NLS_SORT二sort Here sort made a sequence of language? Use location: process and SQL statement? Example: Select NLS INITCAP ( , ABCD , ) from dual; Abed At Select NLS_INITCAP (abed) from dual; Abed 6,NLS_LOWER Syntax: NLS_LOWER (string, nlsparams) The function retu
9、rns all the letters in the string are lowercase string ? Not alphabetic characters remain unchanged? The nlsparams Nlsparams parameter form and use and NLS_INITCAP are the same ? If the nlsparams is not included, then the NLS_LOWER for processing and Same LOWER? Use position; process and SQL stateme
10、nt? 7,NLS_UPPER Syntax: nls_upper (string, nlsparams) Function: the return of all the letters in the string are capitalized in the form of string? Not alphabetic characters remain unchanged ? The parameters of nlsparams and NLS_INITCAP in the form and use of the same? If No set parameters, NLS_UPPER
11、 function and UPPER. Use location: process and SQL statement? 123456789abcabcabc 10,RTRIM Syntax: RTRIM (stringl, , string2) Function: returns and deletes the character that appears in the stringl from the right? The string2. string2 is set to a single space by default? The database will scan string
12、l and start from the right To the first character in string2, the results will be returned to the behavior of RTRIM and LTRIM are very similar? Use location: process and SQL statement. Example: Select RTRIM (T2345678956789) from dual; One thousand two hundred and thirty-four 11,SOUNDEX Syntax: SOUND
13、EX (string) Function: returns the sound representation of string? This is very helpful for comparing two words that are different in spelling but similar in pronunciation Use location: process and SQL statement? 12,SUBSTR Syntax: SUBSTR (string, a, b) Function: returns a substring of B that starts w
14、ith the letter string as the value a. If a is 0, then it is considered to start from the first character? If it is a positive number, the return character is left If the B is negative, then the returned character is calculated from the right end of the string from the right to the left? If B does no
15、t exist, then it defaults to the entire character String. If B is less than 1, then NULL? will be returned? If a or B uses floating point numbers, the value is first converted to an integer before the processing is performed Use location: process and SQL statement? 13,TRANSLATE Syntax: TRANSLATE (st
16、ring, from_str, to_str) Function: return every character will appear in the from_str to replace the corresponding characters in the to_str after the string ? TRANSLATE is a superset of REPLACE , s functions? If from_str is Ionger than to_str, then the characters in from_str but not in to_str will be
17、 deleted from string because they have no corresponding replacement characters? To_str cannot be empty The empty string that is.Oracle NULL, and if any of the parameters in TRANSLATE NULL, then the result is NULL? Use location: process and SQL statement? 14,UPPER Syntax: UPPER (string) Function: ret
18、urns uppercase string? is not letter character unchanged? If string is CHAR data type, then lhe result is also CHAR type. If string is VARCHAR2 type, then The result is also VARCHAR2 type Using location: procedural statements and SQL statements? Character function return numbets These functions acce
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- oracle 存储 过程 函数 汇总 docx
链接地址:https://www.31doc.com/p-5616193.html