DECLARE @cnt int = 0; while @cnt < 1000000 BEGIN INSERT INTO dbo.test (Time, Location) VALUES (dateadd(second,round((datediff(second,'2021-01-01','2021-01-05 23:59:59.997')-(1))*rand(),(0)),'2021-01-01'), Geography::Point(60-(RAND(CHECKSUM(NEWID()))*(120+1)), 150-(RAND(CHECKSUM(NEWID()))*(300+1)),4326)); SET @cnt = @cnt + 1 END