我想將數據從mysql導出到csv中。有很多表,所以我想要一個csv文件與許多工作表。如何做到這一點? 我想出頭,如: SELECT *
FROM product
WHERE active = 1
INTO OUTFILE '/root/tmp/data.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY
我試圖執行這個MySQL來將一些數據導入到csv文件中。 SELECT *
FROM purchase WHERE purchase.PO_DATE >= '1-1-2016'
INTO OUTFILE "D:\\Reports\\Jan.csv"
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
但是
我創建了一個帶有遊標的存儲過程,以便從幾張表中獲取信息到一個臨時表中,然後將結果導出到多個文件中,每個文件對應一個客戶端ID,遊標和循環得到的所有信息的權利,但在創建每個文件 BEGIN
DECLARE id_cli INT;
DECLARE cur_id_cli CURSOR FOR SELECT id FROM cliente ORDER BY id;
OPEN
爲什麼會出現以下查詢運行,但我永遠不能找到文件outfile? select *
INTO OUTFILE 'outfile.csv'
FIELDS TERMINATED by ','
LINES TERMINATED BY '\n'
from nGrams
我的MySQL 5.5,我從MySQL工作臺