欢迎投稿

今日深度:

Sql Server中让程序暂停几秒中,再执行后面的命令

Sql Server中让程序暂停几秒中,再执行后面的命令!(示例)


Sql Server中让程序暂停几秒中,再执行后面的命令!(示例)


-- 语法


WAITFOR 
{
    DELAY 'time_to_pass' 
  | TIME 'time_to_execute' 
  | [ ( receive_statement ) | ( get_conversation_group_statement ) ] 
    [ , TIMEOUT timeout ]
}


waitfor delay'00:00:10' -- 暂停10秒
select GETDATE()

WAITFOR TIME '23:00';  -- 几点几分执行
WAITFOR DELAY '01:00';   -- 1小时以后执行



www.htsjk.Com true http://www.htsjk.com/shujukunews/284.html NewsArticle Sql Server中让程序暂停几秒中,再执行后面的命令!(示例) Sql Server中让程序暂停几秒中,再执行后面的命令!(示例) -- 语法 WAITFOR { DELAY 'time_to_pass' | TIME 'time_to_execute' | [ ( receive_...
相关文章
    暂无相关文章
评论暂时关闭