Excel to Mysql

2007-08-14 11:43 pm
怎樣或可否將excel 的data 轉入去 Mysql

回答 (1)

2007-08-15 12:04 am
✔ 最佳答案
將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,...]


收錄日期: 2021-04-23 18:55:35
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070814000051KK03138

檢視 Wayback Machine 備份