The MySQL server can operate in different SQL modes, and can apply these modes differently for different clients, depending on the value of the sql_mode system variable. DBAs can set the global SQL mode to match site server operating requirements, and each application can set its session SQL mode to its own requirements.
Questions tagged [sql-mode]
102 questions
2
votes
1 answer
Not able to set sql_mode to none
I use version 5.7.9 as seen below on mac El Capitan.
~ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.9 MySQL Community Server (GPL)
Copyright (c) 2000,…

shin
- 31,901
- 69
- 184
- 271
2
votes
3 answers
How do I define commands to run upon starting sql-mode?
I use Sql-mode to connect to an Oracle database. The default settings for linesize and pagesize, and colsep are not ideal, so I'd like to have Emacs automatically run the following commands upon connecting to my databases:
SET COLSEP "|"
SET…

Babu
- 159
- 6
2
votes
1 answer
No multiple SQLi buffers in emacs 24.2.1 anymore?
i recently updated to from openSuSE 11.4 to 12.2 with
GNU Emacs 24.2.1 (x86_64-suse-linux-gnu, GTK+ Version 3.4.4).
When i start the first SQLi buffer (sql-mysql), all works a before, but when i want to start another SQLi buffer (sql-mysql) the…

Lars
- 1,426
- 10
- 25
2
votes
0 answers
Emacs SQLi mode has unbalanced quotes in SQL sending
Interesting problem here. When trying to send any reasonable amount of information in an Emacs SQLi-mode buffer, the result is often unbalanced quotes, and random statements failing to be interpreted. However, when I run the SQL file a little bit at…

Archenoth
- 354
- 5
- 14
2
votes
1 answer
customize emacs sql-mode to execute sql-blocks
REPL in EMACS is really a great feature I love so much.
but under sql-mode, I encountered quite a few issues.
like:
I would like to use db3( a wrapper of db2 which can recoginze alias ), can I start a db3 shell buffer and make the sql-mode…

zinking
- 5,561
- 5
- 49
- 81
1
vote
0 answers
MariaDB 10.5 changing sql_mode in .cnf does not change @@sql_mode, why?
Fedora Desktop 35 running MariaDB 10.5, completely fresh install from about a month ago.
Why is my change to /etc/my.cnf/mariadb-server.cnf sql_mode changing @@GLOBAL.sql_mode but not @@sql_mode?
I'm trying to remove STRICT_TRANS_TABLES from my…

Neek
- 7,181
- 3
- 37
- 47
1
vote
3 answers
How to disable global system variables to reset after restarting MySQL?
I wanted to disable the ONLY_FULL_GROUP_BY value of sql-mode permanently even restart the MySQL server. following things I have tried to do but which are not working. that set to the default value when restarting the MySQL.

david marook
- 21
- 4
1
vote
1 answer
AWS RDS SESSION vs. GLOBAL sql modes SETTING values
I have installed a new AWS RDS MariaDB, imported all my tables and it's up and running. In my old DB I did not have STRICT_TRANS_TABLES set so I have to go through all my tables and modify the columns to specify null values. Until then I want to…

Cesar Bielich
- 4,754
- 9
- 39
- 81
1
vote
0 answers
Cannot turn off only_full_group_by on Azure Database for MySql Server
I'm using Azure Database for MySql Server, and when running a certain stored procedure, I get this error:
In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'mydatabase.mytable.id'; this is incompatible…

Fabricio Rodriguez
- 3,769
- 11
- 48
- 101
1
vote
1 answer
Error Code: 1292. Incorrect date value: '0000-00-00' for date column
I'm trying to run the following script in MySQL Workbench:
UPDATE `people` SET `dateDied` = '0000-00-00';
And I get this error:
Error Code: 1292. Incorrect date value: '0000-00-00' for column 'dateDied' at row 1
Now I have already disabled strict…

Jason Ayer
- 621
- 1
- 10
- 20
1
vote
1 answer
Ways MySQL/MariaDB could silently be changing values when storing
I'm searching for cases in MySQL/MariaDB where the value transmitted when storing will differ from the value that can be retrieved later on. I'm only interested in fields with non-binary string data types like VARCHAR and *TEXT.
I'd like to get a…

mvo
- 1,138
- 10
- 18
1
vote
1 answer
Is it possible to get sum without change sql_mode?
I have a problem to get SUM value from multiple table using join statement. The error is:
this is incompatible with sql_mode=only_full_group_by
Is it possible to get sum without change sql_mode? If possible, how to make a SQL statement to?
Table…

simon
- 33
- 5
1
vote
0 answers
MYSQL - SET SESSION sql_mode = '';" - good idea?
I am thinking of the implications of setting the sql_mode=';' or sql_mode='' on session level.
Please, skip safety considerations of strict mode and it advantages.

EJO
- 11
- 1
- 2
1
vote
3 answers
MySQL default value error with ON DUPLICATE KEY UPDATE with sql mode ON
Common query for both create and update contact.
While doing an updation for a field:-
An exception occurred while executing
INSERT INTO contact_table
SET id = '1234',
is_stealth_mode = 1
ON DUPLICATE KEY UPDATE
id = LAST_INSERT_ID( id…

Neethu George
- 587
- 5
- 8
1
vote
2 answers
empty query after mysql upgrade from 5.5 to 5.7
I'm working on a laravel 4.2 app that was running on a mysql 5.5. This app migrated to a new server, now running a mysql 5.7.
After the upgrade some queries are now returning empty.
I believe this as something to do with the sql_mode mysql 5.7 has…

cmancre
- 1,061
- 3
- 11
- 23