gpt4 book ai didi

mysql - 从mysql表中删除特定日期记录

转载 作者:行者123 更新时间:2023-11-29 01:55:55 25 4
gpt4 key购买 nike

我想从MYSQL表中删除特定日期的记录

在 TIMESTAMP 中插入日期

我试过这个查询但没有成功:

DELETE FROM `tracking` WHERE `track_time` = '2015-03-07'

表中的记录在那个时间戳中出现

DELETE FROM `tracking` WHERE `track_time` = '2015-03-07'

2014-05-28 00:00:02

请告诉我

最佳答案

试试这个:

DELETE FROM tracking WHERE date(track_time) = '2015-03-07'

DELETE FROM tracking 
WHERE track_time > '2015-03-07 00:00:02' and track_time < '2015-03-08 00:00:02'

关于mysql - 从mysql表中删除特定日期记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29469576/

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