mysql -hhost -uuser -ppassword database -e "select query" | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > output_file.csv
Created
December 21, 2018 16:10
-
-
Save Navds/08a3b093b0d9e2253a3e37535cf947fd to your computer and use it in GitHub Desktop.
Cool sql snippets
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment