要在t-sql中写一个无限循环的子程序

但是找不到类似C#中的sleep语句,后来查找到,可以使用以下语句waitfor语句来实现这样的功能

 

 



   waitfor delay @delaylength
   
select @returninfo = 'a total time of ' + 
                  
substring(@delaylength13+
                  
' hours, ' +
                  
substring(@delaylength52+ 
                  
' minutes, and ' +
                  
substring(@delaylength82+ 
                  
' seconds, ' +
                  
'has elapsed! your time is up.'
   
print @returninfo
end
go

相关文章:

  • 2021-11-07
  • 2022-03-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
猜你喜欢
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2021-05-21
相关资源
相似解决方案