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

unadlib

关注

阅读 10

2022-02-03

以下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)

0 0 举报