开发者

In a MySQL environment that is not strict, is there a way to test a query using strict?

开发者 https://www.devze.com 2023-04-11 11:59 出处:网络
I know that there is STRICT_ALL_TABLES, but I am not the admin and absolutely cannot set that on the database. However, I was wondering if I could set that for a query, kind of like select SQL_NO_CACH

I know that there is STRICT_ALL_TABLES, but I am not the admin and absolutely cannot set that on the database. However, I was wondering if I could set that for a query, kind of like select SQL_NO_CACHE, for debugging purposes.

开发者_Go百科

version is 5.1.42

Thanks!


You can set strict mode just for your connection with

SET SESSION sql_mode='STRICT_ALL_TABLES';

Having set it, you can then execute your query on the same connection.

See manual for more details.

0

精彩评论

暂无评论...
验证码 换一张
取 消