Re: WHERE Date = '' MySQL 8
select version();
+-----------+
| version() |
+-----------+
| 8.0.16 |
+-----------+
use test;
drop table if exists t;
create table t(d date);
set @@sql_mode='allow_invalid_dates';
select @@sql_mode;
+---------------------+
| @@sql_mode |
+---------------------+
| ALLOW_INVALID_DATES |
+---------------------+
insert into t values('');
select d from t; -- NOTE NO ERROR
+------------+
| d |
+------------+
| 0000-00-00 |
+------------+
set @@sql_mode='allow_invalid_dates,strict_all_tables'; -- NOTE ERROR
select @@sql_mode;
insert into t values('');
Error: Incorrect date value: '' for column 'd' at row 1
Subject
Views
Written By
Posted
991
July 26, 2019 07:30AM
422
July 26, 2019 10:20AM
397
July 29, 2019 02:03AM
Re: WHERE Date = '' MySQL 8
436
July 29, 2019 10:17AM
419
July 30, 2019 01:59AM
483
July 28, 2019 01:35PM
432
July 29, 2019 01:56AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.