Αποτελέσματα Αναζήτησης
Oracle DECODE() function syntax. The following illustrates the syntax of the Oracle DECODE() function: DECODE (e , s1, r1[, s2, r2], ...,[,sn,rn] [, d]); Code language: SQL (Structured Query Language) (sql) Arguments e. The first argument e is the value to be searched. The function automatically converts e to the data type of s1 before ...
- Oracle Coalesce Function
Summary: in this tutorial, you will learn how to use the...
- Oracle Coalesce Function
1 Ιουν 2023 · The purpose of the Oracle DECODE function is to perform an IF-THEN-ELSE function. It’s similar to a CASE statement, but CASE is a statement where DECODE is a function. It allows you to provide a value, and then evaluate other values against it and show different results.
10 Ιουλ 2014 · DECODE(a, b,c, d,e, f,g, ..., h) will compare a to b, d, f, etc., in turn. If a is b, then DECODE returns c; if a is d, then DECODE returns e; and so on. If a is not any of these, then DECODE returns h. (The h is optional; the default return-value, if h is not given, is NULL.)
Syntax. The syntax for the DECODE function in Oracle/PLSQL is: DECODE( expression , search , result [, search , result]... [, default] ) Parameters or Arguments. expression. The value to compare. It is automatically converted to the data type of the first search value before comparing. search. The value that is compared against expression.
Syntax. Description of the illustration decode.eps. Purpose. DECODE compares expr to each search value one by one. If expr is equal to a search, then Oracle Database returns the corresponding result. If no match is found, then Oracle returns default. If default is omitted, then Oracle returns null.
How-to: decode. Return different values based on the content of a column/expression. decode(expression ,search1 ,return1 [,search2 ,return2] [,searchN ,returnN] [,default] ) Examples. SELECT decode(emp_sex, 'M', 'Male', 'F', 'Female', 'Unknown') FROM employees;
Syntax. Description of the illustration decode.gif. Purpose. DECODE compares expr to each search value one by one. If expr is equal to a search, then Oracle Database returns the corresponding result. If no match is found, then Oracle returns default. If default is omitted, then Oracle returns null.