Tags: arc nvl char 3.1 com no insert substr create-----------------------------------------------character function--------------------------------------------- --1:asciiReturns the ASCII value of a string SELECT ASCII (' A ') from DUAL; SELECT ASCII (' a ') from DUAL; --2:chrReturns the ASCII character corresponding to an integer SELECT CHR (' n ') from DUAL; SELECT CHR (+) from DUAL; --Returns an empty if the Acii value is exceeded --3:concat funct
The decode () function is one of the powerful functions of Oracle Pl/sql, and it is currently available only in Oracle company SQL, and not in the SQL implementations of other database vendors. (But it's not a standard
right, that is, starting from the fourth position on the right and starting from 1, and then the second occurrence of the word A is still from the left, that is, a S d f a S D f a, but the number is from the right.9 8 7 6 5 4 3 2 1Select InStr (' Asdfasdfasdfasdf ', ' asdf ', -3,1) from dual; --13Starting from right-to-left 3rd, the 1th occurrence of the index position of ' asdf '(5) Uppercase and lowercase conversionsSelect Upper (' Asdfasgas '), lower (' Ghjajdgj ') from dual;Select Lower (en
Single-record functions in SQL
1.ASCII
Returns the decimal number corresponding to the specified character;
Sql> Select ASCII (' a ') a,ascii (' A ') a,ascii (' 0 ') zero,ascii (') space from dual;
A A ZERO space
--------- --------- --------- ---------
65 97 48 32
2.CHR
Give an integer and return the corresponding character;
Tom";?>Run the result is: I ' m Tom.2. Automatically escape and restore string dataAutomatic escape, restore string data can be implemented using the Addslashes () function and the stripslashes () function provided by PHP.The Addslashes () function is used to add a slash to the string.The Stripslashes () function is used to restore a string that is escaped using
This article is not ready to introduce all of the Oracle functions, in the current situation, I do not have this time, need to learn too much, to spend most of the time on learning to use the technical aspects:), so if you are ready to learn all the Oracle functions of friends, or to focus on:
Oracle character FunctionsDescription: The input value of a character function is of the character type and the return value is of the character or number type. It can be used directly in an SQL statement or in a PL/SQL block.
1. ASCII (n) FunctionsDescription: return the ASCII code of the string (the ASCII code of the
Tags: end scalar required POI Nullif Point not contexts preReference: http://docs.oracle.com/database/122/SQLRF/Functions.htm#SQLRF006 Single-row functions return a single result row for every row of a queried table or view. These functions can appear in select lists, WHERE clauses, and START WITH CONNECT BY clauses, and HAVING clauses. The one-line function returns a single result row for each row of the q
oracle| function (author: Star Prodigal zhongcfido@126.com)
Ocidefinebyname
Allow the SELECT command to use PHP variables.
Syntax: boolean ocidefinebyname (int stmt, string ColumnName, mixed variable, int [type]);
Return Value: Boolean value
Types of functions: Database features
Content Description
This function is used to define the specified PHP vari
A function is a program that has 0 or more parameters and has a return value. In SQL, Oracle builds a series of functions that can be called SQL or PL/SQL statements, and functions are divided into two main classes: Single-line
This article mainly describes the comparison between common DB2 functions and Oracle functions, including descriptions of type conversion functions, time and date, string functions, and mathematical
Oracle built-in function analysis SQL single record function 1. ASCII returns the decimal number corresponding to the specified character. SQL> select ascii ('A') A, ascii ('A') A, ascii ('0') zero, ascii ('') space from dual; a zero space --------- 65 97 48 32 www.2cto.com 2. the CHR gives an integer and returns the corresponding characters.
Single-record functions in SQL1.ASCIIReturns the decimal number corresponding to the specified character;Sql> Select ASCII (' a ') a,ascii (' A ') a,ascii (' 0 ') zero,ascii (') space from dual;
A A ZERO space--------- --------- --------- ---------65 97 48 32
2.CHRGive an integer and return the corresponding character;Sql> Select Chr (54740) ZHAO,CHR () chr65 f
deleted. In the actual business, can be used to delete some of the exception data, such as Table A field t_no represents a telephone number, and the phone number itself should be a string consisting of numbers, in order to delete those containing non-numeric exception data, I used the Translate function: SQL> Delete fromA,whereLength (Translate (Trim (a.t_no),'0123456789' ||A.t_no,'0123456789')
Oracle note (5) single-row functions although each database supports SQL statements, each database also has the operation functions supported by each database. These are single-row functions, if you want to develop a database, you need to learn more
Tags: tcap to_char SQL statement string Tor Mina 1.2 unit definitionPL/SQL single-line functions and group functions A function is a program that has 0 or more parameters and has a return value. Oracle built a series of
Feel that some netizens always put forward some very basic questions, for example, there is no function to achieve such functions ah, what is the function of Ah, what the format is, and so on, but also feel their understanding of the lack of Oracle function, so focused on the remainder of the time to focus on the Oracle function, small heart is afraid to be conce
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.