declare @renewId int = 46;
declare @year int = 2;
update top(1 ) [IFengKe].[dbo].[PartnerSerialKey] set [UseTime] =null , [LockTime] =null,[LockDeviceUuid] =null ,[ExpirationDate]=null
where [IsUse]=0 and [IsLock] =0
update [dbo].[Renew] set [AddYear]=@year ,[AfterDueTime]=DATEADD(YEAR, @year, [CreateTime] )
where Id=@renewId;
update [dbo].[PartnerSerialKey] set [ExpirationDate]=DATEADD(YEAR, @year, [UseTime] )
where [RenewId]=@renewId and [IsUse]=0 and [IsLock] =0
t-sql 脚本变量声明与使用
最新推荐文章于 2024-05-10 14:50:38 发布