Home | Mirror | Search |
查詢結果輸出到檔案
SELECT * FROM tablename INTO OUTFILE '/tmp/tablename.txt';
使用tee將屏幕輸出到檔案
mysql>tee /home/neo/screen.txt mysql>select * from user; mysql>exit
SELECT * INTO OUTFILE '/home/mark/Orders.txt' FIELDS TERMINATED BY = ',' FROM Orders WHERE Order_Date >= '2000-01-01'
LOAD DATA INFILE 'data.txt' INTO TABLE db2.my_table;