Strict mode is on for MySql,
still I am able to insert empty strings into variables
which are declared as VARCHAR NOT NULL.
Why?
How to avoid it?
Ans :
Try this... add this to your MySQL's config file if you want to make this permanent( --sql-mode='STRICT_ALL_TABLES')
For time being you can set it from command line
SET GLOBAL sql_mode= 'STRICT_ALL_TABLES';
For time being you can set it from command line
SET GLOBAL sql_mode= 'STRICT_ALL_TABLES';
No comments:
Post a Comment