select语句执行过程

内存、磁盘结构

实践经验
- datetime类型字段比较
select * from t_test where create_time between str_to_date('2022-04-19 00:00:00','%Y-%m-%d %H:%i:%s') and str_to_date('2022-04-20 23:59:59','%Y-%m-%d %H:%i:%s');
select * from t_test where UNIX_TIMESTAMP(create_time) between UNIX_TIMESTAMP('2022-04-19 00:00:00') and UNIX_TIMESTAMP('2022-04-20 23:59:59');
Mysql中’%Y-%m-%d %H:%i:%s’的写法与Oracle数据库不同,需要注意这一点。
本文探讨了如何在MySQL中使用`str_to_date`与Oracle不同的日期格式进行`SELECT`查询,通过实例对比`datetime`类型字段比较的方法,并提到了不同数据库间的注意事项。
1056

被折叠的 条评论
为什么被折叠?



