Click to See Complete Forum and Search --> : SQL dummy data


ArtyMcSwizzle
07-14-2004, 10:55 AM
Need some help,

I'm trying to create some dummy data in a mySQL data base. Basicly I have a table of users with all the users info (user table), and I have another table that logs other random information (logging table). The latter table shares the userid with the user table.

Basicly what I want to do is do a SELECT statement for all of the users in the user table, and then for each row in the SELECT statement create a row in the logging table.

How would I go about iterating through that SELECT statement?

I'm using mysql 4.0.2, accessing through mysqlcc 0.9.4-beta

blingbling!!
07-14-2004, 12:30 PM
How about select ... into?

http://dev.mysql.com/doc/mysql/en/SELECT_INTO_Statement.html

ArtyMcSwizzle
07-14-2004, 01:47 PM
yes that would work... Dont know why that didn't occure to me earlier. Thank you.