将SQL时间间隔添加到时间戳记值

时间:2018-11-19 05:53:23

标签: sql sql-update sybase

能为您提供以下帮助吗?

我有一个称为branch_process_control的关系,其中包含一个字段run_time_not_before(日期时间)。

我还有一个返回当前日期和时间dbo.udf_getdate的函数。

我想运行一条更新语句来设置run_time_not_before =今天的日期,并且要比当前时间早1分钟。

以下内容正确吗?我正在使用DBVisualizer Sybase数据库。

update branch_process_control 
    set run_time_not_before = dbo.udf_getdate + (interval '1 minute') 
where branch_process_control_guid ='f7bb0acc6a4947908f34dfb0bf0e3adf' 
 and  process_name = 'Branch MonthEnd Action Processor'

0 个答案:

没有答案