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
Post a Comment