oracle COALESCE function analysis

2010-11-08  来源:本站原创  分类:Database  人气:89 

COALESCE
Return to their argument the first non-empty expression.

Syntax
COALESCE (expression [, ... n])

Parameters
expression

Any type of expression.

n

You can specify multiple expressions that placeholder. All expressions must be the same type, or can be hidden into the same type.

Return type will return the same value as the expression.

Note If all arguments are NULL, the COALESCE returns NULL.

COALESCE (expression1, ... n) is equivalent to this CASE function:

CASE
WHEN (expression1 IS NOT NULL) THEN expression1
...
WHEN (expressionN IS NOT NULL) THEN expressionN
ELSE NULL

相关文章
  • oracle COALESCE function analysis 2010-11-08

    COALESCE Return to their argument the first non-empty expression. Syntax COALESCE (expression [, ... n]) Parameters expression Any type of expression. n You can specify multiple expressions that placeholder. All expressions must be the same type, or

  • oracle (COALESCE function) 2010-12-13

    Database application software will often multiple, related entities, the information stored in the same table. For example, the purchase of locally produced parts and components are part, managers and workers are all employees, despite the multiple e

  • oracle COALESCE function resolution 2010-11-08

    COALESCE Returns its argument in the first non-empty expression. Grammar COALESCE (expression [, ... n]) Parameter expression Any type of expression. n You can specify multiple expressions that placeholder. All expressions must be the same type, or c

  • oracle's NVL, NVL2, NULLIF, COALESCE function of several common 2010-03-26

    Oracle introduced in the previous string handling functions, date functions, mathematical functions, and the transfer function, etc., there is a class function is a common function. There are: NVL, NVL2, NULLIF, COALESCE, these functions used in vari

  • Oracle reference manual analysis of function 2010-04-02

    Oracle began offering analysis functions from 8.1.6 to analyze the function used to calculate the aggregate value based on a certain group, it and the difference between aggregate function is to return multiple rows for each group, and aggregate func

  • ORACLE common function Demo 2010-08-18

    ORACLE common function Demo Documents written: Meng New EDITORIAL: ORACLE built-in function, the equivalent of C language library functions, a general database programming required in the most basic functions, and through a combination or nested func

  • oracle over () function 2011-08-02

    Preparation : table:oracle Under the user scott emp Table : A . Oracle Starting from 8.1.6 to provide an analysis function , Analysis function is used to calculate the aggregate values ​​of a group-based, aggregate it, and the difference is a functio

  • NVL, NVL2, NULLIF, COALESCE function 2011-08-08

    1.NVL function NVL function format is as follows: NVL (expr1, expr2) If the oracle first argument is empty then display the second parameter, if the first parameter is not empty, the first parameter is displayed the original value. 2.NVL2 function NV

  • Oracle SYS_CONTEXT Function 2010-03-15

    Oracle SYS_CONTEXT Function Version 11.2 Oracle SYS_CONTEXT Function Version 11.2 Actions As SYS Note: USERENV is an Oracle provided namespace that describes the current session. Syntax SELECT sys_context ('<namespace>', '<parameter>', <len

  • oracle date function switch 2010-03-17

    oracle date functions Oracle date function Collection (1) A commonly used data format date 1.Y or YY or YYY last year, two or three SQL> Select to_char (sysdate, 'Y') from dual; TO_CHAR (SYSDATE, 'Y') -------------------- 7 SQL> Select to_char (sysd

  • Oracle plsql function Daquan 2010-04-13

    Oracle plsql function Daquan SQL in single-record function 1.ASCII Returns the character corresponding to the specified decimal number; SQL> select ascii ('A') A, ascii ('a') a, ascii ('0 ') zero, ascii (' ') space from dual; AA ZERO SPACE ---------

  • Oracle Database Function (single function) 2010-07-01

    Oracle Database Function (single function) Oracle's functions and C functions in almost the same also have the function names, parameter table, and return value types composed of single function, is the result for each record has a. One-way function

  • oracle substr function in the usage of 2010-08-31

    oracle substr function in the usage of In oracle / PLSQL, the substr functions allows you to extract a substring from a string. The syntax for the substr function is: substr (string, start_position, [length]) Description: string is the source string.

  • Oracle analytic function RANK (), ROW_NUMBER (), LAG () to use such 2010-10-15

    Oracle analytic function RANK (), ROW_NUMBER (), LAG () to use such ROW_NUMBER () OVER (PARTITION BY COL1 ORDER BY COL2) Said the group based on COL1, COL2 sorted according to the group within which the value is indicated after each sequence number w

  • oracle Round () function 2010-10-22

    oracle Round () function Round () function Return a value, the decimal value according to a specified number of bits for rounding the results of operations Syntax ROUND (number, decimal_places) number: the value to be rounded handle decimal_places: r

  • Oracle built-in function (greatest, least, to_single_byte) 2010-10-23

    Oracle built-in function (greatest, least, to_single_byte) Take a maximum of one-dimensional array greatest SELECT Greatest('a','x','fit','xa') FROM dual; Take a minimum of one-dimensional array least SELECT Least('a','x','fit','xa','ab') FROM dual;

  • sqlserver coalesce function 2010-11-03

    SQL Server COALESCE () function COALESCE function returns the list of features the first non-empty expression. Syntax COALESCE (expression, expression [, ...]) Parameters expression Any expression. Standards and compatibility SQL/92 SQL/92. SQL/99 co

  • Oracle date function and application (transfer) 2010-11-03

    Oracle date function and application (transfer) I believe many people have had the experience of some of the data statistics, such as the financial situation to statistics, may according to an annual, quarterly, monthly, or even every week to the res

  • Oracle analytic function RANK (), ROW_NUMBER (), LAG () and so the use of methods (Reprinted) 2010-11-15

    Oracle analytic function RANK (), ROW_NUMBER (), LAG () to use such ROW_NUMBER () OVER (PARTITION BY COL1 ORDER BY COL2) Said the group based on COL1, COL2 sorted according to the group within which the value is indicated after each sequence number w

  • sql coalesce () function application 2010-12-06

    Quote COALESCE () function --- Introduction --- T-SQL's COALESCE () function lets you specify multiple expressions, and COALESCE () returns the group in the first non-empty values. To use the form below, where expression can be any data type, and can