Reputation: 55584
What is your way of creating and populating test tables in MySQL when looking into SO questions where tables (but not CREATEs) and test data (but not INSERTs) are provided?
And what client do you use?
EDIT: Here's a simply example of what I mean on SO.
Upvotes: 0
Views: 855
Reputation: 55584
The great SQL Fiddle offers exactly what I wanted: Text to DDL
Upvotes: 0
Reputation: 4112
You can have this done for you at http://www.generatedata.com/#generator Simply specify the column names & datatypes, and how you want the data to be output (SQL statements, HTML,Excel,XML,CSV) .
Upvotes: 1
Reputation: 25694
Now that I understand the question, I can answer... I'd either do a bulk import of CSV/TSV, or (more likely for smaller data sets), load the example from the question into Vim and regex it into insert statements. I'd write the table create statements by hand. This all of course assumes that I need to create the tables at all, since in general I answer from experience and don't need any actual tables to play with (as @gahooa said in his/her comment).
Upvotes: 1
Reputation: 6887
I would suggest using phpMyAdmin. It provides a fairly easy-to-use interface for inserting multiple rows at once.
Upvotes: 1