1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-21 21:22:27 +03:00
Files
mariadb/mysql-test/suite/compat/oracle/t/func_decode.test
Alexander Barkov c8822d71ef MDEV-10342 Providing compatibility for basic SQL built-in functions
Adding the Oracle style DECODE function:

  DECODE(operand, search, result [, search, result ...] [, default_result])
2017-04-05 15:02:49 +04:00

22 lines
480 B
Plaintext

SET sql_mode=ORACLE;
--error ER_PARSE_ERROR
SELECT DECODE(10);
--error ER_PARSE_ERROR
SELECT DECODE(10,10);
SELECT DECODE(10,10,'x10');
SELECT DECODE(11,10,'x10');
SELECT DECODE(10,10,'x10','def');
SELECT DECODE(11,10,'x10','def');
SELECT DECODE(10,10,'x10',11,'x11','def');
SELECT DECODE(11,10,'x10',11,'x11','def');
SELECT DECODE(12,10,'x10',11,'x11','def');
EXPLAIN EXTENDED SELECT DECODE(12,10,'x10',11,'x11','def');
CREATE TABLE decode (decode int);
DROP TABLE decode;