如何使用 SQL 查询指定日期范围内的评论数据?

查询指定日期范围

根据 create_time 时间戳查询 comment 表中今日指定 id 的数据。

查询语句:

select * from comment where to_days(create_time) = to_days(now()) and id = 21;