Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
Description
Select numbers in MariaDB SQL_MODE=ORACLE is not like Oracle resulting into 0.1 instead of .1
In Oracle
select 0.1 as value from dual;
|
|
+------+
|
|value |
|
+------+
|
| .1 |
|
+------+
|
|
select 00000000000.1 as value from dual;
|
|
+------+
|
|value |
|
+------+
|
| .1 |
|
+------+
|
|
While in MariaDB with in Oracle mode
MariaDB [(none)]> select @@sql_mode;
|
+----------------------------------------------------------------------------------------------------------------------------------------------+
|
| @@sql_mode |
|
+----------------------------------------------------------------------------------------------------------------------------------------------+
|
| PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT |
|
+----------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.000 sec)
|
|
MariaDB [(none)]> select 0.1 as value from dual;
|
+-------+
|
| value |
|
+-------+
|
| 0.1 |
|
+-------+
|
|
MariaDB [(none)]> select 00000000000.1 as value from dual;
|
+-------+
|
| value |
|
+-------+
|
| 0.1 |
|
+-------+
|
1 row in set (0.001 sec)
|
|