开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜