Skip to content

Instantly share code, notes, and snippets.

@LQ80
Last active May 1, 2021 21:47
Show Gist options
  • Save LQ80/c38f562071969bd6edcc6313bc6f1073 to your computer and use it in GitHub Desktop.
Save LQ80/c38f562071969bd6edcc6313bc6f1073 to your computer and use it in GitHub Desktop.
MS SQL - Export Binary field to file
bcp "SELECT [filedata] FROM [database].[dbo].[files] where [id] = {ID NUMBER}" queryout "{OUTPUT FILE NAME}" -S {MS SQL SERVAER NAME}\SQLEXPRESS -T -f bcp.fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment