Decode() Function usage skills
· Software environment:
1. Windows NT4.0 + Oracle 8.0.4
2. Oracle installation path: C:/orant
· Meaning:
Decode(Condition, value 1, translation value 1, value 2, translation value 2,... value n, translation value n,
Address: http://wentao365.iteye.com/blog/1156889
Sign Function:
Used to determine whether a value is positive, 0, or negative. The returned values are 1, 0, and-1 respectively.
Decode function: Decode (expression, value 1, result 1, value 2,
Introduction to the Decode () function:Main role: Translation of query results into other values (that is, in other forms of expression, the following examples);How to use:Select decode (ColumnName, value 1, translation value 1, value 2, translation
Description: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:Copy codeThe Code is as follows:IF condition = value 1 THENRETURN (translation value 1
Transferred from: http://www.cnblogs.com/evening/archive/2012/04/19/2457440.htmlString encoding Common types: UTF-8,GB2312,CP936,GBK and so on.In Python, we use decode () and encode () to decode and encodeIn Python, the Unicode type is used as the
Create or replace function decode (variadic p_decode_list text[]) returns text as$ $declare -- Get array length (that is, number of arguments) v_len integer := array_length (p_decode_ list, 1); -- declares the variable v_ret text;begin /* *
Preface
DECODE () function, which compares the input value with the parameter list in the function and returns a corresponding value based on the input value. The parameter list of a function is a sequence of several numbers and their corresponding
The decode function can replace the results of a query, and decode actually function like an if statement.Decode (VAR,VAR1,VALUE1,VAR2,VALUE2,VAR3,VALUE3) is equivalent to if Var=var1 then ... else if Var=var2 then ... else var=var3 then ...But only
Description: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)Elsif condition = value 2
Description of the Decode () function in oracle: DECODE (condition, value 1, translation value 1, value 2, translation value 2 ,... value n, translation value n, default value) the meaning of this function is as follows: IF condition = value 1 then
Decode () function Introduction: main role: Translating query results to other valuesHow to use:Select decode (ColumnName, value 1, translation value 1, value 2, translation value 2,... Value n, translation value n, default value)From TalbenameWhere
SELECT A.areaname AS Level two place name from houses h,houses H2,Areas a WHERE H.areaid=a.areasid and H2.areaid=a.areasid and H.finalassessmentid=1 andH.houseslevel=2 and H2.houseslevel=1 and A.areasid!=a.parentareasid and a.companysid=2;SELECT *
There are two main types:Meaning explanation: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
The decode () function is one of the powerful functions of ORACLEPLSQL. Currently, only oracle SQL provides this function, and other database vendors do not yet implement this function. The DECODE function is one of the powerful functions of
The Decode function is used extensively in Oracle SQL query statements and is often applied to the PL/SQL statement block.The basic expression of the 1,decode () function statement is:Decode (EXPR1,EXPR2,EXPR3,[EXPR4])This expression is understood
Oracle NULL represents uncertainty. Will there be a definite data type for uncertain items? Alternatively, let's change the default data type of NULL in Oracle. Here we will discuss this issue. First, I will announce the answer. The default type of
In Oracle, the Decode () function is a powerful function in oracle pl/SQL. Currently, only oracle SQL provides this function, this function is not available for SQL implementations of other database vendors. The DECODE function is one of the
Oracle DatabaseThere are many functions. This article mainly introducesDecode,Sign,TruncNext, let's take a look at this part of the function.
I. decode
In Oracle/PLSQL, decode has the same features as IF-THEN-ELSE.
The decode function syntax is as
Decode(Condition, value 1, translation value 1, value 2, translation value 2,... value n, translation value n, default value)
The function has the following meanings:
If condition = value 1 thenReturn (translation value 1)Elsif condition = value
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.