Is there a SELECT … INTO OUTFILE equivalent in SQL Server Management Studio?

前端 未结 2 375
深忆病人
深忆病人 2020-11-28 13:58

MySQL had a nifty command SELECT ... INTO OUTFILE that could write the result set into a file (CSV format or some other optional format).

I am currentl

2条回答
  •  野性不改
    2020-11-28 14:35

    In SQL Management Studio you can:

    1. Right click on the result set grid, select 'Save Result As...' and save in.

    2. On a tool bar toggle 'Result to Text' button. This will prompt for file name on each query run.

    If you need to automate it, use bcp tool.

提交回复
热议问题