Microsoft SQL ServerExport data in txt file by using SQLCMD


Syntax

  • sqlcmd -S SHERAZM-E7450\SQL2008R2 -d Baseline_DB_Aug_2016 -o c:\employee.txt -Q "select * from employee"