Description: 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 THENRETURN (translation value 1) ELSIF
In the process of database development, it is often necessary to convert rows into columns or convert columns into rows to display data. However, when creating a table structure, we often cannot store data according to the display requirements,
I. Software Environment
1. windows nt4.0 + oracle 8.0.4
2. oracle installation path: c: \ orant
Ii. Meaning
Iii. Usage
1. Compare the size
Select decode (sign (variable 1-variable 2),-1, variable 1, variable 2) from dual; -- smaller value
In the actual development, sometimes there will be let you do statistics, make statements.
For example, in the Student elective management system allows you to write all the students of each of the results, at this time we write the results of the
first, according to the field content grouping;
Less gossip.
1. Create a table T1:sql statement as follows
CREATE TABLE T1 (ID integer NOT NULL primary key,Name varchar (10),Job varchar (10));
2. Insert some data:
INSERT into T1 values (1, ' Jack ',
The decode () function is one of the most powerful functions of Oracle PL/SQL and is currently available only to Oracle Corporation, where SQL implementations of other database vendors do not yet have this function. Tools/Materials
•
Functions in Oracle (1)-The Decode ecode () function is one of the powerful functions of oracle pl/SQL. Currently, only oracle SQL provides this function, this function is not available for SQL implementations of other database vendors. The DECODE
The decode () function is one of the most powerful functions of Oracle PL/SQL and is currently available only to Oracle Corporation, where SQL implementations of other database vendors do not yet have this function.Tools/Materials
•
The decode () function is one of the most powerful functions of Oracle PL/SQL and is currently available only to Oracle Corporation, where SQL implementations of other database vendors do not yet have this function. Baidu Experience:
1. The length of char is fixed, the length of the VARCHAR2 can vary, for example, the storage string "abc", for Char (20), which means that the characters you store will occupy 20 bytes (including 17 null characters), in the database it is occupied
The DECODE function is one of the powerful functions of ORACLEPLSQL. Currently, only oracle SQL provides this function, which is not available for SQL implementations of other database vendors.
The DECODE function is one of the powerful functions of
The DECODE function is one of the powerful functions of ORACLEPLSQL. Currently, only oracle SQL provides this function, which is not available for SQL implementations of other database vendors.
The DECODE function is one of the powerful functions of
The DECODE function is one of the powerful functions of oracle pl/SQL. Currently, only oracle SQL provides this function, and other database vendors do not yet implement this function. What is the purpose of DECODE? First, let's construct an example.
The Decode function is one of the most powerful functions of Oracle PL/SQL, and it is currently available only to Oracle companies, and the SQL implementations of other database vendors do not yet have this function. What is the use of decode? Let's
Compare size function sign Function Syntax: sign (n) Function Description: Take the number n symbol, return 1 if it is greater than 0, return-1 if it is less than 0, return 0 if it is equal to 0. Example: 1. selectsign (100), sign (-100), sign (0)
Before we knew this function, we had to use a number of functions and outer joins to calculate the categorical statistics for the same table or one of the fields in the same query statement block. Using this function can often solve a lot of complex
Author: network collection, source: IT expert network, responsible editor: ttdb,
The decode () function is one of the powerful functions of Oracle PL/SQL. Currently, only oracle SQL provides this function, this function is not available for SQL
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 SQL function, but that's his
When it comes to the Oracle Decode function, What is the main purpose of DECODE? First, we need to construct a related example. If we want to increase the salary for employees of a company, the standard is that the salary of less than 8000 yuan will
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.