运行触发器怎么出错呀?
ALTER TRIGGER [DelAlarm]
ON [dbo].[vcom_alarm_set] for DELETE
AS
declare @tempid int
BEGIN
select @tempid = vasid from deleted
delete from vcom_alarmdev_ship where vasalarmid = @tempid
delete from vcom_alarm_action where vaaalarmid = @tempid
delete from vcom_alarmpurview where vpalarmid = @tempid
delete from vcom_alarm_plan where vapalarmid = @tempid
END
语法可以通过,但运行时就出错,如下:
消息 208,级别 16,状态 6,过程 temp1,第 10 行
对象名 'temp1' 无效。
请教高人指点。谢谢各位!!!