gpt4 book ai didi

mysql - 从时间戳列中选择最近几个月的记录 mysql

转载 作者:行者123 更新时间:2023-11-30 00:08:43 25 4
gpt4 key购买 nike

我有一个 mysql 数据库,其中有一个标题为日期的 TIMESTAMP 字段。如何选择上个月的所有字段?

例如 2014 年 5 月 1 日,然后 2014 年 5 月 31 日等等。

提前致谢!

最佳答案

select * from table where timestamp_col=LAST_DAY(timestamp_col)

Source

关于mysql - 从时间戳列中选择最近几个月的记录 mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24280506/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com