importing sql statements

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a text file with about 90,000 insert statements (as below). Is there
an easy way I can get these into my mysql database in one fell swoop? Can
anyone tell me how and perhaps that the syntax is? Thanks -Ike


Re: importing sql statements

If the table is already available, you can do it this way from the console:

shell> mysql -u [username] -p[password] [database name] < [text file name]

If the table doesn't already exist, you should create it first.


Site Timeline