SQLCMD to export sql data

export to a csv

sqlcmd -S . -d DatabaseName -E -s',' -W -Q "SELECT * FROM TableName" > C:\Test.csv

Advertisements