阅读背景:

创建触发器必须是批处理中的第一个语句。

来源:互联网 

I have the below trigger:

我有下面的触发器:

 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 < @Capacity
 Begin 
      Insert Into Enrollments Select * From Inserted
 End
 GO
 CREATE



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: