当前位置: 代码迷 >> Sql Server >> 为什么小弟我的这个简单的触发器总报错!
  详细解决方案

为什么小弟我的这个简单的触发器总报错!

热度:80   发布时间:2016-04-27 13:26:09.0
为什么我的这个简单的触发器总报错!!!
为什么我的这个触发器,总报错.
--------原码---------------
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]
  相关解决方案