TRADITIONAL
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Modes for MariaDB Xpand
Topics on this page:
Overview
This mode is an alias for STRICT_
EXAMPLES
Setting the SQL_MODE
Note that @@sql_mode
is the same as @@session.sql_mode
:
SELECT @@sql_mode, @@session.sql_mode;
+---------------------+---------------------+
| @@sql_mode | @@session.sql_mode |
+---------------------+---------------------+
| STRICT_TRANS_TABLES | STRICT_TRANS_TABLES |
+---------------------+---------------------+
The following adds the TRADITIONAL
alias to the existing SQL_MODE
session value, which adds any missing aliased flags to the value:
SET sql_mode = CONCAT(@@sql_mode, ',TRADITIONAL');
SELECT @@sql_mode;
+---------------------------------------+
| @@sql_mode |
+---------------------------------------+
| STRICT_TRANS_TABLES,STRICT_ALL_TABLES |
+---------------------------------------+
Assigning an empty string turns off all SQL_MODE
flags:
SET sql_mode = '';