27,579
社区成员
发帖
与我相关
我的任务
分享
INSERT INTO [Relation]([CustomerId],[UserId],[CreateDate])
SELECT [Id],1,GETDATE() FROM [Customers]
alter table Relation disable trigger all
--完成後
alter table Relation enable trigger all
SET ROWCOUNT 1000; INSERT INTO [Relation]([CustomerId],[UserId],[CreateDate]) SELECT [Id],1,GETDATE() FROM [Customers] WHILE @@ROWCOUNT=1000 INSERT INTO [Relation]([CustomerId],[UserId],[CreateDate]) SELECT [Id],1,GETDATE() FROM [Customers] SET ROWCOUNT 0;