使用waitfor time和waitfor delay[@more@]
[case 1]
WAITFOR TIME '01:20:04'
begin
declare @i int = 0
while (@i < 3)
begin
insert into ContentType_Log(TypeID,TypeName,LastUpdateDate)
select TypeID,TypeName,getdate() as LastUpdateDate
from TypeTable
set @i = @i + 1
WAITFOR DELAY '00:00:10'
end
end
GO
[case 2]
WAITFOR TIME '01:23:34'
GO
begin
insert into ContentType_Log(TypeID,TypeName,LastUpdateDate)
select TypeID,TypeName,getdate() as LastUpdateDate
from TypeTable
WAITFOR DELAY '00:00:10'
end
GO 3
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/66009/viewspace-1060870/
,如需转载,请注明出处,否则将追究法律责任。