📄 strict.result
字号:
INSERT INTO t1 (col1) VALUES('-129');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES('128');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES('-1');ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES('256');ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col1) VALUES(128.0);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES(-1.0);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES(256.0);ERROR 22003: Out of range value adjusted for column 'col2' at row 1SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 1;MOD(col1,0)NULLWarnings:Error 1365 Division by 0UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0;ERROR 22003: Out of range value adjusted for column 'col1' at row 1UPDATE t1 SET col2=col2 + 50 WHERE col2 > 0;ERROR 22003: Out of range value adjusted for column 'col2' at row 3UPDATE t1 SET col1=col1 / 0 WHERE col1 > 0;ERROR 22012: Division by 0set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO';INSERT INTO t1 values (1/0,1/0);Warnings:Error 1365 Division by 0Error 1365 Division by 0set @@sql_mode='ansi,traditional';SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 2;MOD(col1,0)NULLNULLWarnings:Error 1365 Division by 0Error 1365 Division by 0INSERT INTO t1 (col1) VALUES ('');ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1INSERT INTO t1 (col1) VALUES ('a59b');ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1INSERT INTO t1 (col1) VALUES ('1a');ERROR 01000: Data truncated for column 'col1' at row 1INSERT IGNORE INTO t1 (col1) VALUES ('2a');Warnings:Warning 1265 Data truncated for column 'col1' at row 1INSERT IGNORE INTO t1 values (1/0,1/0);Warnings:Error 1365 Division by 0Error 1365 Division by 0set @@sql_mode='ansi';INSERT INTO t1 values (1/0,1/0);set @@sql_mode='ansi,traditional';INSERT IGNORE INTO t1 VALUES('-129','-1'),('128','256');Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2INSERT IGNORE INTO t1 VALUES(-129.0,-1.0),(128.0,256.0);Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2UPDATE IGNORE t1 SET col2=1/NULL where col1=0;SELECT * FROM t1;col1 col2-128 00 NULL127 255-128 00 NULL127 255-128 00 NULL127 255NULL NULL2 NULLNULL NULLNULL NULL-128 0127 255-128 0127 255DROP TABLE t1;CREATE TABLE t1(col1 SMALLINT, col2 SMALLINT UNSIGNED);INSERT INTO t1 VALUES(-32768,0),(0,0),(32767,65535),('-32768','0'),('32767','65535'),(-32768.0,0.0),(32767.0,65535.0);INSERT INTO t1 (col1) VALUES(-32769);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES(32768);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES(-1);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES(65536);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col1) VALUES('-32769');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES('32768');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES('-1');ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES('65536');ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col1) VALUES(-32769.0);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES(32768.0);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES(-1.0);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES(65536.0);ERROR 22003: Out of range value adjusted for column 'col2' at row 1UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0;ERROR 22003: Out of range value adjusted for column 'col1' at row 1UPDATE t1 SET col2 = col2 + 50 WHERE col2 > 0;ERROR 22003: Out of range value adjusted for column 'col2' at row 3UPDATE t1 SET col1 = col1 / 0 WHERE col1 > 0;ERROR 22012: Division by 0UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;ERROR 22012: Division by 0INSERT INTO t1 (col1) VALUES ('');ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1INSERT INTO t1 (col1) VALUES ('a59b');ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1INSERT INTO t1 (col1) VALUES ('1a');ERROR 01000: Data truncated for column 'col1' at row 1INSERT IGNORE INTO t1 (col1) VALUES ('2a');Warnings:Warning 1265 Data truncated for column 'col1' at row 1INSERT IGNORE INTO t1 values (1/0,1/0);Warnings:Error 1365 Division by 0Error 1365 Division by 0INSERT IGNORE INTO t1 VALUES(-32769,-1),(32768,65536);Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2INSERT IGNORE INTO t1 VALUES('-32769','-1'),('32768','65536');Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2INSERT IGNORE INTO t1 VALUES(-32769,-1.0),(32768.0,65536.0);Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2UPDATE IGNORE t1 SET col2=1/NULL where col1=0;SELECT * FROM t1;col1 col2-32768 00 NULL32767 65535-32768 032767 65535-32768 032767 655352 NULLNULL NULL-32768 032767 65535-32768 032767 65535-32768 032767 65535DROP TABLE t1;CREATE TABLE t1 (col1 MEDIUMINT, col2 MEDIUMINT UNSIGNED);INSERT INTO t1 VALUES(-8388608,0),(0,0),(8388607,16777215),('-8388608','0'),('8388607','16777215'),(-8388608.0,0.0),(8388607.0,16777215.0);INSERT INTO t1 (col1) VALUES(-8388609);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES(8388608);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES(-1);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES(16777216);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col1) VALUES('-8388609');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES('8388608');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES('-1');ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES('16777216');ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col1) VALUES(-8388609.0);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES(8388608.0);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES(-1.0);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES(16777216.0);ERROR 22003: Out of range value adjusted for column 'col2' at row 1UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0;ERROR 22003: Out of range value adjusted for column 'col1' at row 1UPDATE t1 SET col2 = col2 + 50 WHERE col2 > 0;ERROR 22003: Out of range value adjusted for column 'col2' at row 3UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0;ERROR 22012: Division by 0UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;ERROR 22012: Division by 0INSERT INTO t1 (col1) VALUES ('');ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1INSERT INTO t1 (col1) VALUES ('a59b');ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1INSERT INTO t1 (col1) VALUES ('1a');ERROR 01000: Data truncated for column 'col1' at row 1INSERT IGNORE INTO t1 (col1) VALUES ('2a');Warnings:Warning 1265 Data truncated for column 'col1' at row 1INSERT IGNORE INTO t1 values (1/0,1/0);Warnings:Error 1365 Division by 0Error 1365 Division by 0INSERT IGNORE INTO t1 VALUES(-8388609,-1),(8388608,16777216);Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2INSERT IGNORE INTO t1 VALUES('-8388609','-1'),('8388608','16777216');Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2INSERT IGNORE INTO t1 VALUES(-8388609.0,-1.0),(8388608.0,16777216.0);Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2UPDATE IGNORE t1 SET col2=1/NULL where col1=0;SELECT * FROM t1;col1 col2-8388608 00 NULL8388607 16777215-8388608 08388607 16777215-8388608 08388607 167772152 NULLNULL NULL-8388608 08388607 16777215-8388608 08388607 16777215-8388608 08388607 16777215DROP TABLE t1;CREATE TABLE t1 (col1 INT, col2 INT UNSIGNED);INSERT INTO t1 VALUES(-2147483648,0),(0,0),(2147483647,4294967295),('-2147483648','0'),('2147483647','4294967295'),(-2147483648.0,0.0),(2147483647.0,4294967295.0);INSERT INTO t1 (col1) VALUES(-2147483649);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES(2147643648);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES(-1);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES(4294967296);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col1) VALUES('-2147483649');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES('2147643648');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES('-1');ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES('4294967296');ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col1) VALUES(-2147483649.0);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES(2147643648.0);ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col2) VALUES(-1.0);ERROR 22003: Out of range value adjusted for column 'col2' at row 1INSERT INTO t1 (col2) VALUES(4294967296.0);ERROR 22003: Out of range value adjusted for column 'col2' at row 1UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0;ERROR 22003: Out of range value adjusted for column 'col1' at row 1UPDATE t1 SET col2 =col2 + 50 WHERE col2 > 0;ERROR 22003: Out of range value adjusted for column 'col2' at row 3UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0;ERROR 22012: Division by 0UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;ERROR 22012: Division by 0INSERT INTO t1 (col1) VALUES ('');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES ('a59b');ERROR 22003: Out of range value adjusted for column 'col1' at row 1INSERT INTO t1 (col1) VALUES ('1a');ERROR 01000: Data truncated for column 'col1' at row 1INSERT IGNORE INTO t1 (col1) VALUES ('2a');Warnings:Warning 1265 Data truncated for column 'col1' at row 1INSERT IGNORE INTO t1 values (1/0,1/0);Warnings:Error 1365 Division by 0Error 1365 Division by 0INSERT IGNORE INTO t1 values (-2147483649, -1),(2147643648,4294967296);Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2INSERT IGNORE INTO t1 values ('-2147483649', '-1'),('2147643648','4294967296');Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2INSERT IGNORE INTO t1 values (-2147483649.0, -1.0),(2147643648.0,4294967296.0);Warnings:Warning 1264 Out of range value adjusted for column 'col1' at row 1Warning 1264 Out of range value adjusted for column 'col2' at row 1Warning 1264 Out of range value adjusted for column 'col1' at row 2Warning 1264 Out of range value adjusted for column 'col2' at row 2UPDATE IGNORE t1 SET col2=1/NULL where col1=0;SELECT * FROM t1;col1 col2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -