title: How do I INSERT binary data from a local file with SQLCMD?
body: <p>I need to insert binary data from a file into a varbinary(max) column in SQL Server as a part of my deployment script. </p>
  
  <p>The file is on the local machine, SQL Server is on the remote.</p>
  
  <p>Here is the data table definition</p>
  
  <pre><code>CREATE TABLE [dbo].[Config] (
      [ID]   INT            IDENTITY (1, 1) NOT NULL,
      [Name] NVARCHAR (50)  NOT NULL,
      [Cfg]  VARBINARY(MAX) NOT NULL
  );
  </code></pre>
  
  <p>I need something like this pseudo-command</p>
  
  <pre><code>INSERT INTO Config(ID, Name, Cfg) VALUES (0, 'Default', ????('Default.cfg')??? )
  </code></pre>
  
  <p>i.e. data is taken from a local file.</p>
  
  <p>How can I do this?</p>