importing sql statements

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ike

    #1

    importing sql statements

    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



    INSERT INTO `lastnames` VALUES ('OFFENBERGER') ;


  • Markus Popp

    #2
    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.

    Markus


    Comment

    Working...