title: How to select all fields of a document and a new property
body: <p>I am trying to add a new property to the projection of a query using: <code>select *, 4 Type from c</code>, but it fails with error <code>Syntax error, incorrect syntax near ','</code>. Trying <code>select c.*, 4 Type from c</code> results in a similar error: <code>Syntax error, incorrect syntax near '*'.</code></p>
  
  <p>Projecting all properties manually is not really an option as not all documents contain all properties (one of the best features of DocumentDb).</p>
  
  <p>How can I do so?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>What I am trying to accomplish is something very simple in any SQL Like language. Open any relational database of your choosing and execute <code>select *, 4 Type from [Table]</code> and the results are very straight forward: a table with all it's columns and it's corresponding values plus an additional column named <code>Type</code> with all rows having the same value: <code>4</code>. The difference here is that in a relational database with schema all rows in the database contain the same columns, so it is easy to enumerate the columns instead of asking for <code>*</code>. In a schemaless environment like documentdb you can't enumerate them because there could be unlimited combinations.</p>
  
  <p>I am trying to accomplish the same thing that <code>select c.id, 4 Type from c</code> accomplishes, but with all properties</p>