BCP is the bulk copy utility for MSSQL. It is a good tool for making backups of tables before running an update query.:
bcp myDB..myTable out myOutputFile.sql -U myUser -P myPassword -S myServer -c -q
or, to use a trusted connection:
bcp myDB..myTable out myOutputFile.sql -T -S myServer -c -q
Note the double periods between the db name and the table. I don't know why it's there, but it's necessary.
Tags: mssql, query, backup, export, import, bcp, bulk, copy, records, sql server, fast