✔ 最佳答案
將excel儲存為csv檔, 方法是, 檔案, 儲存至, 選csv檔案格式便可, 然後用load data command 匯入該csv檔至mysql中, load data 指令如下,
LOAD DATA INFILE 'data.txt' INTO TABLE db2.my_table;
詳細load data 指令如下,
LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name'
[REPLACE | IGNORE]
INTO TABLE tbl_name
[CHARACTER SET charset_name]
[FIELDS
[TERMINATED BY 'string']
[[OPTIONALLY] ENCLOSED BY 'char']
[ESCAPED BY 'char']
]
[LINES
[STARTING BY 'string']
[TERMINATED BY 'string']
]
[IGNORE number LINES]
[(col_name_or_user_var,...)]
[SET col_name = expr,...]