MYSQL CSV 로 데이터 반환하기
SELECT orderNumber, status, orderDate, requiredDate, comments FROM ordersWHERE status = 'Cancelled'INTO OUTFILE 'C:/tmp/cancelled_orders.csv'FIELDS ENCLOSED BY '"' TERMINATED BY ';' ESCAPED BY '"'LINES TERMINATED BY '\r\n'; mysql -B -D mydatabase -e 'select * from mytable' mysql your_database -p out.csv
웹개발/DataBase
2015. 1. 9. 14:56