作者在 2016-11-21 22:07:03 发布以下内容
#物美数据库系统为例,全量变价每隔2小时变价一次,循环1000次
declare @num smallmoney
declare @n int
set @num=1
set @n=0
while @n<100
begin
update dbo.ElectronLable_HaLa_MerchInfo set RetailPrice=@num
set @num = @num + 1
set @n=@n+1
waitfor delay '02:00:00'
end
declare @num smallmoney
declare @n int
set @num=1
set @n=0
while @n<100
begin
update dbo.ElectronLable_HaLa_MerchInfo set RetailPrice=@num
set @num = @num + 1
set @n=@n+1
waitfor delay '02:00:00'
end