I have a sign
SELECT TOP 1000 [user_sid] ,[user_id] ,[user_full_name] ,[user_mail] FROM [db].[dbo].[users] How can I generate 10,000 users for tests?
I have a sign
SELECT TOP 1000 [user_sid] ,[user_id] ,[user_full_name] ,[user_mail] FROM [db].[dbo].[users] How can I generate 10,000 users for tests?
DECLARE @i int = 0 WHILE @i < 1000 BEGIN INSERT INTO [db].[dbo].[users]([user_sid],[user_id],[user_full_name],[user_mail]) SELECT NEWID(), @i, 'User ' + CAST(@i AS varchar), 'user' + CAST(@i AS varchar) + '@local' SET @i = @i + 1 END
Depending on the column types, you may need to correct the script.
Source: https://ru.stackoverflow.com/questions/820048/
All Articles