title: How can I create a view by passing the name from a parameter? (like: CREATE VIEW @ViewName )
body: <p>How can I use a parameter that stands for a view name which I can pass into CREATE VIEW statement in SQL?</p>
  
  <pre><code>DECLARE @ViewName VARCHAR(40) = 'V_fooo'
  CREATE VIEW @ViewName 
  AS
  SELECT  * from foods
  </code></pre>
  
  <p>Does not work due to a syntax error. How can I achieve this?
  Thanks.</p>