How to output MySQL query results in csv format in Windows environment? -


is there easy way run mysql query powershell command line , output results csv formatted file?

this question same how output mysql query results in csv format? except in windows. had figure out in powershell answer didn't belong on linux question. here's windows+powershell sibling.

stan's answer how output mysql query results in csv format?, adapted windows powershell

mysql my_database_name -u root | out-file .\my_output_file.csv 

this gives me mysql prompt, without usual mysql > @ start. type:

source c:\aboslute\path\with spac es\without\quotes\to\my_select_statement.sql 

it gives error message , exits if there problem command, or gives me empty prompt if command executed successfully. type exit finish up.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -