Export SQL Results as CSV
When executing a SQL query, you can export the results as a CSV file. Doing this will allow you to open them in Excel, import them into PowerShell, etc. After the query executes and you have results, if you click the “Select All” button between the columns and rows it will select all of the results:
After that, if you right-click in the same spot, you will have the option to “Save Results As”. From here, you can save as a CSV.