我所喜欢的
SqlServer的游标当超过1000行左右的时候效率极其低下。
DECLARE @Company VARCHAR(12)='' SELECT TOP 1 @Company=CompanyID FROM dbo.U_Companies --真实表的备份表#tmp IF(LEN(@Company)>0) BEGIN PRINT @Company --处理一条,删除一条 END ELSE BEGIN PRINT 'NOT EXISTS' END
Copyright @ 2024 飘扬De黑夜 Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster