title: INSERT INTO without column names with OUTPUT INSERTED
body: <p>I would like to create a SQL statement that will copy a given record and return the inserted ID, such as:</p>
  
  <pre><code>INSERT INTO DF_FILES
  OUTPUT INSERTED.TableID
  SELECT *
  FROM DF_FILES
  WHERE DOC = "myFile.txt"
  </code></pre>
  
  <p>Then I attempt to capture the ID using the following:</p>
  
  <pre><code>Int32 t_ID = (Int32)command.ExecuteScalar();
  </code></pre>
  
  <p>When I run the statement via C# <code>SqlCommand</code>, I get the following error message.</p>
  
  <blockquote>
    <p>An explicit value for the identity column in table 'DF_FILES' can only be specified when a column list is used and IDENTITY_INSERT is ON.</p>
  </blockquote>
  
  <p>Is there a workaround for getting the ID of a newly created record?</p>
  
  <p>Thanks,
  Darin</p>