sql query result to csv file directly from console -


i want export select query result 2 columns csv file. don't have phpmyadmin or tools this. have run query directly console. can give me hint how can this?

you try use command:

select field_1,field_2 table_name outfile '/tmp/output.csv' fields terminated ',' enclosed '"' lines terminated '\n'; 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

c# - Retrieve google contact -

javascript - How to insert selected radio button value into table cell -