select table_name, coumn_name from information_schema.columns where table_schema = '<database name>' order by table_name;
INTO OUTFILE '/tmp/orders.txt'
SELECT order_id,product_name,qty FROM orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
-- Export results
SELECT order_id,product_name,qty FROM ordersINTO OUTFILE '/tmp/orders.txt'
SELECT order_id,product_name,qty FROM orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
No comments:
Post a Comment