Which three statements describe how the strict SQL mode provides added security?
A.
It rejects statements that try to insert out-of-range values
B.
It rejects invalid dates.
C.
It limits the operations that the server can perform.
D.
It rejects queries that produce out-of-range values.
E.
It rejects dates with zero day or month values.
Explanation:
A, B, D
I’m not quite sure with B. I think E would be the better choice.
So: A, D, E
A,B,E… Strict mode controls how MySQL handles invalid or missing values in data-change statements such as INSERT or UPDATE but not queries
http://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sql-mode-strict
A,B,E
A, B, E
CDE
strict is only about INSERT/UPDATE
A, B, E
A-true, throws “data too long”
B- true, Invalid dates like ’13-13-2001′ are rejected
C- true, it limits INSERT|UPDATE
D- false, it only affects INSERT|UPDATE, not SELECT
E- false, you can do
SET @@SESSION.SQL_MODE=’STRICT_TRANS_TABLES’;
CREATE TABLE t(d datetime);
INSERT INTO t(d) VALUES (‘2001-00-00’);
SELECT YEAR(d) FROM t; — 2001
agree with you
C is false, it does not limit the INSERT | UPDATE on server. The server can still perform all operations ( INSERT / UPDATE / DELETE / SELECT )
Only the strict sql mode itself is limited to INSERT | UPDATE.
limit is not reject,OK?
ABC
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_strict_trans_tables
====================
Strict mode affects whether the server permits dates in which the year part is nonzero but the month or day part is 0 (dates such as ‘2010-00-01’ or ‘2010-01-00’):
If strict mode is not enabled, dates with zero parts are permitted and inserts produce no warning.
If strict mode is enabled, dates with zero parts are not permitted and inserts produce an error, unless IGNORE is given as well. For INSERT IGNORE and UPDATE IGNORE, dates with zero parts are inserted as ‘0000-00-00’ (which is considered valid with IGNORE) and produce a warning.
=============================================