0

I have 300,000K records in the sql table and i want to add duplicate records randomly to that table at least 100,000k duplicate records need to be added to the table.

Purpose: I am doing bulk load testing from our end if our process checks for duplicate records.

I have no clue on how to take this forward, can anyone help me.

Sunderam Dubey
  • 1
  • 11
  • 20
  • 40
  • `INSERT INTO... SELECT TOP (100000) ... FROM...`? – Thom A Jun 29 '22 at 17:53
  • looking for random not the top 100000k records. – user15132810 Jun 29 '22 at 18:03
  • Does this answer your question? [Select n random rows from SQL Server table](https://stackoverflow.com/questions/848872/select-n-random-rows-from-sql-server-table) – SMor Jun 29 '22 at 18:09
  • Without an `ORDER BY` they are arbitrary, @user15132810 . Note I didn't include one. – Thom A Jun 29 '22 at 18:11
  • @Larnu You know that "arbitrary" is not "random". If OP really wants random (which might be questionable), then TOP will not satisfy that requirement. – SMor Jun 29 '22 at 18:19
  • True, but arbitrary often fulfils the requirements; especially considering all the OP is doing is testing a process we know little/nothing about, @SMor . – Thom A Jun 29 '22 at 18:29

0 Answers0