How do i do this:
mysql -u myuser -p mydb -e "select f1,f2 from mytable" > /tmp/mydata.txt
But I want to separate the fields with a comma.
mysql --delimiter=, -u myuser -p mydb -e "select f1,f2 from mytable" > /tmp/mydata.txt
Does not work 🙁
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t really understand what is the question? Can you explain what you want ?
If your wish is to add delimiter to your output, you have to use CONCAT_WS :