Is there something like INTO...OUTFILE(from MySQL) in Microsoft SQL Server?
INTO...OUTFILE
This code resets the query results to a text file.
EXEC master..xp_cmdshell'bcp "SELECT TOP 5 CUSTOMERID FROM Northwind.dbo.Customers" queryout "c:\text.txt" -c -T -x'
Literature:
You can also use sqlcmd or osql (in SQL 2000) to store command line output outside of SSMS, very similar to working with mysql from the command line. You just need to provide the correct parameters, including the query you want to run.
It depends on what kind of fantasy you want to get. You can use SSMS to create a CSV . A less user-friendly option is to export BCP . What I see @ hamlin11 just suggested