- Click the Windows “Start” button. Enter “cmd” into the text box and press “Enter”. This opens the Windows command line.
- Type the following code to export your table to a CSV file:
bcp database.dbo.customer out customer.csv /Uuser /Ppassword /ScustomerServer /c /t
In this example, the customer table is exported to the “customer.csv” file. The “user” and “password” are the values used to access the server. “CustomerServer” is the name of your database server.
- Press “Enter” to execute your bcp command. It may take several minutes to export to the CSV file, depending on the size of your table.
export table mssql
2
Apr