title: How to create a view and select from it in one SINGLE query execution
body: <p>I want to create a veiw and then select from it in one query, would you please tell me how it is possible the code below:</p>
  
  <pre><code>create view myView as
  select [Order Details].Discount from [Order Details]
  select * from myView
  </code></pre>
  
  <p>if i want to run the code, first i have to select that part which is related to creating a view and then i have to select the next part which is related to selecting from that view. i wanted to know the way that both those queries run together when we execute the query the view would be created and then the select executes.</p>
  
  <p><strong>now i want to add that if once i create that veiw the other time SQL gives me error. how can i fix this?? mean that the object will be created just one time</strong> </p>