Reputation: 3194
Yes, of course, I know, there are many different generators created on Javascipt, php, etc. and even applications and web-services that allow generating sql.
But I’d like to have sql functions library which can be used during generating data right away from MySQL script and stored procedures.
Now I'm creating my own helper functions (and it’s quite tedious) that work roughly like bellow: (fl_* - are functions that return fake data of corresponding type and features.)
-- create a fake user:
call sp_user_add(fl_login(), fl_email(), fl_gender(), @user_id);
-- add a fake post:
call sp_post_add(@user_id, fl_title(true, 1, 10), fl_body(true, 3, 20), @post_id);
Upvotes: 1
Views: 244
Reputation: 7722
See http://www.generatedata.com/. Here you can select the SQL-Tab and select the number of rows you want to get created. The result is a SQL-script you can copy-paste. I found this very handy...
Upvotes: 0