BULK INSERT in MYSQL

后端 未结 1 2030
借酒劲吻你
借酒劲吻你 2020-11-27 18:20

On MS SQL, I can do bulk insert using the sql command below:

BULK INSERT myDatabase.MyTable FROM \'C:\\MyTextFile.txt\' WITH  FIELDTERMINATOR = \',\'
         


        
相关标签:
1条回答
  • 2020-11-27 18:49

    In MySQL, the equivalent would be

    LOAD DATA INFILE

    http://dev.mysql.com/doc/refman/5.1/en/load-data.html

    LOAD DATA INFILE 'C:\MyTextFile'
    INTO TABLE myDatabase.MyTable
    FIELDS TERMINATED BY ','
    
    0 讨论(0)
提交回复
热议问题