select o.* from user o where 1=1 and userId = 100041 and createTime between '2016-05-04' and '2016-05-06' order by o.createTime desc
始终缺少当天比如六号那天的记录,该怎么办?
デフォルトは 2016-05-06 00:00:00 であると推定されます createTime を '2016-05-04 00:00:00' と '2016-05-06 23 の間で使用します:59 :59' 試してみましょう
ユーザー o から o.* を選択します (1=1、userId = 100041、createTime '2016-05-04' と '2016-05-07' の間) o.createTime desc で並べ替えます
デフォルトは 2016-05-06 00:00:00 であると推定されます
createTime を '2016-05-04 00:00:00' と '2016-05-06 23 の間で使用します:59 :59' 試してみましょう
ユーザー o から o.* を選択します (1=1、userId = 100041、createTime '2016-05-04' と '2016-05-07' の間) o.createTime desc で並べ替えます