title: ALter view after insert by trigger sql server
body: <p>I create a - view in sql server.
  I want to alter the view every time that a - row is added to my table .
  I create trigger for it :</p>
  
  <pre><code>CREATE TRIGGER Trigger1
  ON dbo.Table1
  AFTER INSERT
  AS 
  BEGIN
  ALTER VIEW VIEW1 as
  SELECT *
  From Table1
  END
  </code></pre>
  
  <p>But I get the error : 'ALTER VIEW' must be the only statement in the batch.</p>
  
  <p>What should I do to correct it error ?</p>