Extract date from datetime column

If the TxnDate column is a datetime type, should the first query not work the same as the second?

(02:13) mysql>select * from Response where date(TxnDate) = '2010-02-05';
Empty set (0.11 sec)

(02:14) mysql>select * from Response where trim(date(TxnDate)) = '2010-02-05';
...
...
207 rows in set (0.12 sec)

I can not reproduce this problem. But the query associated with this table becomes affected. version - 5.0.45

+3
source share
1 answer

It seems that he should do something with error No. 29898

http://bugs.mysql.com/bug.php?id=29898

+1
source

Source: https://habr.com/ru/post/1731520/


All Articles