为什么我的这个触发器,总报错.
--------原码---------------
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER TRIGGER [HBTrigger_YellowPagesQuery_Delete]
ON [dbo].[YellowPages_Query]
for delete
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
insert into HBTrigger_YellowPagesQuery select id, 'Delete', '' from Deleted
END
-------------------------
错误:
消息 208,级别 16,状态 6,过程 HBTrigger_YellowPagesQuery_Delete,第 16 行
对象名 'HBTrigger_YellowPagesQuery_Delete' 无效。
------解决方案--------------------
- SQL code
create TRIGGER [HBTrigger_YellowPagesQuery_Delete]