Options

Is there a way to generate random data and yet honor the PK, FK constraints

Hi there,
I have just downloaded a trial version of Red Gate SQL Data generator and wanted to know , if  we  can generate random data in SQL Data Generator rows (say 1,000,000 rows per table in a DB) meeting all the constraints that are imposed on the SQL server 2014 database. The constraints should not be altered, disabled or deleted and the data generated should meet these constraints.
Thanks,
Vinay

Best Answer

  • Options
    Alex BAlex B Posts: 1,132 Diamond 4
    Hi @WinWin,

    SQL Data Generator automatically assigns the Foreign Key generator to columns that have a foreign key constraint.  See the section Foreign Keys from this documentation page which describes this (there is also information.  You can customize the generator, but it must be used for any column that has a foreign key.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.