My colleague received a task yesterday to process the contents of the Oracle database in PHP, but the PHP open Oracle extension is not as straightforward as MySQL, and requires a little something to open it.
The first step is to have the official
The Oracle tutorial you are looking at is: Oracle functions. Pl/sql single-line functions and Group functions
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
We know that in the database, the Chinese character occupies two bytes, while the other characters occupy a byte, so the comparison of two functions can determine whether there is Chinese,
Length calculates character lengths, LENGTHB calculates byte
The Creates a function in Oracle that was intended to return a index table without success. Think of the text can also transfer information, suddenly came to the inspiration, the return value set text format. The return value type is set to CLOB,
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
--------- --------- --------- ------
Show all employee names in lowercase to show the names of all employees in uppercase format. Displays the name of the employee who is exactly 5 characters. Displays the first three characters of all employee names. Displays the names of all
First, decode functionMeaning explanation:1, Decode (condition, value 1, return value 1, value 2, return value 2,... Value N, return value N, default value)The function has the following meanings:IF condition = value 1 ThenRETURN (translation value 1
Reprinted from: 52778565Encountered Oracle fetch format problem, here's a noteWe usually make the data count, we want it to show the format we need, here's a simple wayTo_char (data, ' fm999,999,999,999,990.00 ')Example:Select To_char (0.59/1.00*100,
First, the function1, take the whole mod (2,10) =22, take the whole trunc (12/10) =13, take the whole ceil (12/10) =24, NULL (NULL) specifies a value NVL (null,9) =95 cumulative sum (piece) =883476. Count of Statistics (keyID) =194Second, arithmetic
Oracle functions have character functions, mathematical functions, date functions, and conversion functions. I've only learned about character functions and math functions.one, character functions :Lower (char) converts a string to a lowercase
The syntax for creating a function is as follows:CREATE [OR REPLACE] FUNCTION function_name[(argment [{in | Out | In Out}] Type,argment [{in | Out | In Out}] Type]RETURN Return_type{is | As}BEGINFunction_bodyEXCEPTIONOther statementsEND;Cases:1
1. Syntax formatCreate [or replace] [(parameter,...) ]return datatypeas| is (local declarations) begin statement; return return_values; end name;2. Create a function named Annual_comp to return the annual salary by receiving two variables
NVL2 (EXPR1,EXPR2,EXPR3): Memory, Nvl2 (), EXPR1 is null, 2 is the 2nd number (that is, EXPR3) returned function: If the parameter expression EXPR1 value is null, the NVL2 () function returns the value of the argument expression EXPR3 If the
Oracle has a number of functions, which are sorted out:Absolute value of ABS (m) mMoD (m,n) m is removed after n remainderPower (M,n) m n-Th SquareRound (M[,n]) m rounded to the value of n bits after the decimal point (n defaults to 0)Trunc (M[,n])
1 GrammarGreatest (Expr_1, expr_2, ... expr_n) 2 DescriptionGreatest (expr_1, expr_2, ... expr_n) function from an expression (column, constant, computed value) expr_1, expr_2, ... expr_n and so on to find the largest number to return. When
For the dbms_random described in the previous article. In the case of the value function, it is obvious that the call to the function occurred during the execution of the SQL statement. However, if you look at the processing of constants in SQL
--translate functionFunction Description:Translate (str, FROM_STR, TO_STR), replacing the from_str in str with TO_STR.Translate is a superset of the functionality provided by replace. From_str and To_str are the corresponding relationships from left
1. If the function is locked, then there must be a process using the functionSelect b.sid,b.serial# from Dba_ddl_locks A, v$session b Where a.session_id = b.sid and A.name = ' function name or table name ';2. Kill processes using commands in
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.