Hardcode the Foreign Key value

The simplest way to populate your database with test data.

Hardcode the Foreign Key value

Postby hashcoderz » Tue Apr 24, 2012 7:15 am


I have a User table with UserStatusId as foreign key, where UserStatus table have two rows

UserStatusId Name
1 Active
2 Deleted

I am going to populate the User table, but i need to populate only Active users, that means UserStatusId is 1.

How should i do it in SQL Data Generator 1? Any suggestions?
Posts: 1
Joined: Tue Apr 24, 2012 7:08 am

Postby Manfred.Castro » Wed Apr 25, 2012 10:32 am

I believe using the Generic - SQL Statement generator may be able to accomplish what you are looking for.

See here for more information.


Hope this helps.
Manfred Castro
Product Support
Red Gate Software
Posts: 209
Joined: Mon Apr 23, 2012 2:49 pm

Return to SQL Data Generator Previous Versions

Who is online

Users browsing this forum: Bing [Bot] and 0 guests