title: SQL Server - Inserting default values bcp
body: <p>In SQL Server, how to insert default values while using <code>bcp</code> command? </p>
  
  <p>Scenario is from the below table, while running <code>bcp</code> command, column 'sno' is identity column, where values should increment automatically by 1, data for <code>values</code> column should come from datafile and values for <code>date</code> column should automatically updated to today's date and values for status column should updated as <code>Flag1</code>.</p>
  
  <p>For normal usage I know how to create <code>bcp</code> format file. For the above scenario, how can I create a format file and insert data to table1?</p>
  
  <p>Table format:</p>
  
  <pre><code>CREATE TABLE [dbo].[table1] 
  (
      SNo int IDENTITY(1,1) NOT NULL,
      values  varchar(13) NOT NULL,
      date    datetime NOT NULL,
      status  varchar(50)
  )
  </code></pre>
  
  <p><code>Table1</code>:</p>
  
  <pre><code>sno  |  values  |    date    |  status
  -----+----------+------------+--------
  1    |  111111  | 2015-08-17 |  Flag1
  2    |  222222  | 2015-08-17 |  Flag1
  </code></pre>