Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to explain the meaning of sql_mode in MySQL 5.7

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces how to explain the meaning of sql_mode in MySQL 5.7. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

Sql_mode is more stringent in MySQL version 5.7. Explain the meaning of each mode:

ONLY_FULL_GROUP_BY do not let queries in the GROUP BY section point to unselected columns

STRICT_TRANS_TABLES enables strict mode for the transactional storage engine and may also enable strict mode for the non-transactional storage engine

NO_ZERO_IN_DATE is in strict mode and does not accept dates where the month or day is partially zero.

NO_ZERO_DATE is in strict mode and does not use '0000-00' as a legal date

ERROR_FOR_DIVISION_BY_ZERO in strict mode, in the INSERT or UPDATE process, if divided by zero (or MOD (XP0)), an error is generated

NO_AUTO_CREATE_USER prevents GRANT from automatically creating new users unless a password is also specified

NO_ENGINE_SUBSTITUTION prevents automatic replacement of the storage engine if the required storage engine is disabled or uncompiled

Note: in a master-slave environment, in order to ensure the consistency of data, you must set the same master-slave sql_mode and ensure the consistency of sql_mode during data migration, otherwise replication and migration will fail due to the above restrictions, so use standard SQL syntax as much as possible.

On how to explain the meaning of sql_mode in MySQL 5.7 is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report