title: Create View and For Json clause
body: <p>With <code>SQL Server 2016</code>, I can run this simple query:</p>
  
  <pre><code>SELECT  colA, colB, json_query(infoJson) AS Expr1
  FROM    dbo.Table_1 
  FOR     json auto
  </code></pre>
  
  <p>I can even wrap it in a stored procedure. And it runs nicely.</p>
  
  <p>But when I tried to create a view out of that statement, something weird (at least to me):</p>
  
  <pre><code>CREATE VIEW [dbo].[View_1]
  AS
  SELECT   colA, colB, json_query(infoJson) AS Expr1
  FROM     dbo.Table_1 
  FOR      json auto
  </code></pre>
  
  <p>This is the error I get:</p>
  
  <blockquote>
    <p>Msg 4511, Level 16, State 1, Procedure View_1, Line 5 [Batch Start Line 9]
    Create View or Function failed because no column name was specified for column 1.</p>
  </blockquote>
  
  <p>But as soon as I comment <code>--for json auto</code>, the <code>VIEW</code> is created as expected.</p>
  
  <p>Why? I'd really like it to have have <code>FOR JSON</code> in my sql view.</p>