DECODE
Decrypt a string. This function decrypts an encrypted string using a password. It is the reverse of the ENCODE function.
Syntax
DECODE(crypt_str,pass_str)DECODE(expr, search_expr, result_expr [, search_expr2, result_expr2 ...] [default_expr])DECODE_ORACLE(expr, search_expr, result_expr [, search_expr2, result_expr2 ...] [default_expr])Description
Examples
SELECT DECODE_ORACLE(2+1,3*1,'found1',3*2,'found2','default');
+--------------------------------------------------------+
| DECODE_ORACLE(2+1,3*1,'found1',3*2,'found2','default') |
+--------------------------------------------------------+
| found1 |
+--------------------------------------------------------+
SELECT DECODE_ORACLE(2+4,3*1,'found1',3*2,'found2','default');
+--------------------------------------------------------+
| DECODE_ORACLE(2+4,3*1,'found1',3*2,'found2','default') |
+--------------------------------------------------------+
| found2 |
+--------------------------------------------------------+
SELECT DECODE_ORACLE(2+2,3*1,'found1',3*2,'found2','default');
+--------------------------------------------------------+
| DECODE_ORACLE(2+2,3*1,'found1',3*2,'found2','default') |
+--------------------------------------------------------+
| default |
+--------------------------------------------------------+Last updated
Was this helpful?

