官方链接参考:https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-strict
1.查看模式
select @@sql_mode; # 为空表示非严格模式
2.调整为严格模式
set global sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES';
配置文件中加入参数
sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES'
|
官方链接参考:https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-strict 1.查看模式 2.调整为严格模式 配置文件中加入参数
|