求高人帮忙看看这段代码错在哪里
CREATE TRIGGER [toupdate]ON db.[tf_mo]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
declare @prd_no char(15) ,@spc char(15)
if exists(select 1 from inserted)
begin
set @prd_no=(select prd_no from inserted)
set @spc = (select spc from prdt where prd_no=@prd_no)
update tf_mo set rem=@spc where prd_no=@prd_no
end
提示是end附近有错误。麻烦各位帮忙看看,谢谢