MariaDB set SQL_MODE

Locked
User avatar
Mihai Romania
Posts: 60
Joined: 2023 May 03, 14:12
Location: ROMANIA
Contact:

MariaDB set SQL_MODE

Post by Mihai »

Connect to MariaDB Server

Code: Select all

[root @ centos ~]$  mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 22993
Server version: 10.3.7-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none]>
Local level settings

Code: Select all

MariaDB [(none]> SET sql_mode = 'moduri';
MariaDB [(none]> SET sql_mode = 'TRADITIONAL,ONLY_FULL_GROUP_BY';
Global level settings

Code: Select all

MariaDB [(none]> SET GLOBAL sql_mode = 'moduri';
MariaDB [(none]> SET GLOBAL sql_mode = 'TRADITIONAL,ONLY_FULL_GROUP_BY';
Installing a new parameter

Code: Select all

MariaDB [(none]> SET @@SQL_MODE = CONCAT(@@SQL_MODE, ',ONLY_FULL_GROUP_BY');
Deleting a parameter

Code: Select all

MariaDB [(none]> SET @@SQL_MODE = REPLACE(@@SQL_MODE, 'ONLY_FULL_GROUP_BY', '');
Checking a parameter

Code: Select all

MariaDB [(none]> SELECT @@SQL_MODE LIKE '%ONLY_FULL_GROUP_BY%';
For more details check the following documentation link from MariaDB.
I'm on LinkedIn
Locked