value of a character (Character functions returning Character values)
The class function returns the same type as the input type.
The returned char type value is no longer than 2000 bytes;
The returned VCHAR2 type value is not longer than 4000 bytes;
If the length of the character that should be returned above is exceeded, Oracle will not make an error but directly truncate to the maximum supporting le
Differences between Oracle procedures and functions: oracle process functions
Oracle process and function are expected to be more familiar. The following describes the differences between Oracle process and function. We hope that
Introduction to Oracle System Variable Functions and oracle Variable Functions
Oracle functions are diverse, and system variable functions are one of them. The following describes the t
oracle| Function | conversion | String Oracle Common numerical functions, conversion functions, string functions introduced.
numeric function:
Absolute value of ABS (m) m
MoD (M,n) m is the remainder after the n is removed
Power (M,n) m's n-th-side
Round (M[,n]) m rounded to
.
Built-in functions
A series of functions provided by ORACLE for executing specific operations.
SQL built-in functions contain one or more parameters and return one value.
SQL built-in functions include single-row functions, grou
Oracle InStr functions
For the InStr function, we often use this: to find the position of a specified substring from a string. For example:
Sql> Select InStr (' Oracle ', ' or ') position from dual;
POSITION
----------
1
Starts at the first position of the string ' Oracle ', looking backwards for the first occurrence o
Oracle analysis functions (notes), oracle Functions
Analytics functions are new types of functions introduced by oracle Database in 9i and are continuously enhanced in later versions. T
Oracle _ Common grouping functions and oracle grouping FunctionsZookeeper
Oracle _ Common grouping Functions① Grouping Function1. max (column): calculates the maximum value, which is not required for the data type. Any data type can be used.2. min (column): calculates the mi
The following code has been tested to run directly
Oracle analysis functions, multidimensional functions and model functions are briefly described, mainly for the BI report statistics, not necessarily very comprehensive, but a little explanation of the BI scenario
--Create a Sales Quantity table, the data trend is in
Oracle provides us with very rich aggregate functions, such as Sum\avg\max. In addition, we can write our own aggregate functions, of course, custom aggregate functions can also be used as analytic functions.
Custom aggregate
Oracle computing time functions (numtodsinterval, numtoyminterval), oracle computing functions
Numtodsinterval (, X is a number, and c is a string,
Indicates the unit of x. This function converts x to interval day to second. Commonly Used units include ('day', 'hour', 'minute ', 'second ') example SQL> select sysdate,
The following code has been tested and can be run directly.A brief description of Oracle analysis functions, multidimensional functions, and Model functions, mainly for BI report statistics, not necessarily comprehensive, but a few instructions on BI application scenarios
-- Create a sales quantity table with an increa
Oracle Functions--common functions
NVL (EXPRESS1,EXPRESS2):
If the first expression is empty, the value of the second expression is displayed; If the first expression is not empty, the value of the first expression is displayed;
NVL2 (EXPRESS1,EXPRESS2,EXPRESS3);
Returns an expression of 3 if the first expression is empty, and returns an expression of 2 if the f
Seven common Oracle functions and seven oracle Functions
1. decode Function
Select id, NAME, DECODE (LEVER, 1, 'Professor ', 2, 'associate Professor', 3, 'mentor ', 'lecturer') POSITION, (select classnum from class t where t. NUM = S. NUM) num from teacher s where t. lever in (1, 2, 3 );
The usage logic of the decode
Tags: oracle function single-line function conversion function conditional expression650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8C/27/wKioL1hjtGywsFtaAABh8bZO-Vc257.png-wh_500x0-wm_3 -wmp_4-s_59910427.png "title=" 1.png "alt=" Wkiol1hjtgywsftaaabh8bzo-vc257.png-wh_50 "/>Single-line function============================================================Characteristics:Each row returns one result, and the input output has a one by one corre
Tags: no character format nbsp sysdate start Ceil Special examplesAbout several Oracle functions that handle the number of decimal places ()1. Rounding of several decimalsSelect Round (1.2345, 3) from dual;Results: 1.2352. Reserved two decimal places, onlySelect Trunc (1.2345, 2) from dual;Results: 1.23 Select Trunc (1.2399, 2) from dual; Results: 1.233. Take an integerReturns the largest integer greater th
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;
Sql> Select Chr (54740) ZHAO,CHR () chr65 from dual;
En C
-- -
Zhao A
3.CONCAT
Connect two strings;
Sql> Select Concat (' 010-
Intersect operator returns only the public rows of two queries. The minus operator returns the rows that appear in the second query from the first query result. >select OrderNo from Order_master minus select OrderNo from Order_Detail; Join operator The join operator is used to combine multiple strings or data values into a single string >select (venname| | ' The address is ' | | venadd1| | ' ' | | venadd2| | ' ' | | VENADD3) address from Vendor_master where vencode= ' v001 '; --by using
First, the numerical function1. MoD (m,n) to find the remainder functionNote: if m or n is null, NULL is returned. If n is 0, the value of M is returnedeg2. Round (M[,n]) roundingIf n has no value, the default is 0, which is equivalent to rounding.If n >0, it is rounded to the N-bit after the decimal point.If n 3. Ceil (n) roundingCeil is the ceiling, the ceiling is on the top, so it's the whole thing, and we can remember that. The upper rounding is the big one, and the 12.34 is 12, so the Ceil
Analysis functions, oracle analysis functions
Analysis functionsBasic syntaxFunction Name ([parameter]) VOER (Partition by clause field ,....[Order by clause field,... [ASC] [DESC] [nulls first] [nulls last][Wing clause]);Use the partition by clause
SELECT deptno, ename, sal, job, SUM (sal) OVER (partition by deptno) sum Department salary sum from emp;
If partiti
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.