title: CREATE TRIGGER must be the first statement in a batch
body: <p>I have the below trigger:</p>
  
  <pre><code> CREATE Trigger enroll_limit on Enrollments
   Instead of Insert
   As
   Declare @Count int
   Declare @Capacity int
   Select @Count = COUNT(*) From Enrollments
   Select @Capacity = Capacity From CourseSections
   If @Count &lt; @Capacity
   Begin 
        Insert Into Enrollments Select * From Inserted
   End
   GO
  </code></pre>
  
  <p>I'm getting an error msg saying:</p>
  
  <blockquote>
    <p>'CREATE TRIGGER' must be the first statement in a query batch.</p>
  </blockquote>