0
点赞
收藏
分享

微信扫一扫

mysql中between and或大于小于查时间,单双引号问题

unadlib 2022-02-03 阅读 10

以下sql文查询结果都一样

SELECT * FROM tb_user where birthday between '2021-01-01' and '2021-05-05';
SELECT * FROM tb_user where birthday between "2021-01-01" and "2021-05-05";
SELECT * FROM tb_user where birthday between '2021-01-01' and "2021-05-05";
select * from tb_user where birthday >= '2021-01-01' and birthday <='2021-05-05';
select * from tb_user where birthday >= 2021-01-01 and birthday <= '2021-05-05';
select * from tb_user where birthday >= "2021-01-01" and birthday <= "2021-05-05";
select * from tb_user where birthday >= "2021-01-01" and birthday <= '2021-05-05';

在这里插入图片描述

举报

相关推荐

0 条评论