gpt4 book ai didi

mysql timediff where 条件

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

我必须在mysql的时间差异中使用一个条件。我必须修改以下查询:-

select 
bugs_team_user_view.bug_id,
bugs_team_user_view.creation_ts
from
bugs_team_user_view, bugs_activity
where
bugs_team_user_view.team like "Red%"
and

timediff(
(select bugs_activity.bug_when from bugs_activity where bugs_activity.added = "RESOLVED"),
bugs_team_user_view.creation_ts) > "00:30:00"

and
bugs_team_user_view.bug_id=bugs_activity.bug_id
and bugs_team_user_view.creation_ts < "2013-08-17 00:00:00"
and bugs_team_user_view.creation_ts >"2013-08-01 00:00:00";

出现错误:-

错误 1064 (42000):您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,了解在“bugs_team_user_view.creation_ts < "2013-08-17 00:00:00”和 bugs_team_user_view.' 附近使用的正确语法。在第 1 行

请帮忙

最佳答案

更改为

timediff(
(select bugs_activity.bug_when from bugs_activity where bugs_activity.added = "RESOLVED"),
bugs_team_user_view.creation_ts) > TIME('00:30:00')

它应该可以工作。

关于mysql timediff where 条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18288728/

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