如何在 IBM Informix 中执行此 MySQL 语句?
select type, channel, teilnr, starttime, endtime, usedtime, host
from online_time
where starttime < DATE_SUB(NOW(),INTERVAL 15 MINUTE)
order by starttime desc
我在 Informix 中尝试了这个,但它给出了一个语法错误。
select type, channel, teilnr, starttime, endtime, usedtime, host
from online_time
where starttime < subdate(CURRENT, INTERVAL "15" MINUTES)
order by starttime desc
最佳答案
select type, channel, teilnr, starttime, endtime, usedtime, host
from online_time
where starttime > (CURRENT - 15 UNITS MINUTE)
order by starttime desc
关于datetime - Informix 日期时间 : How to subtract 15 Minutes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42767316/