SQL Express的“新触发器”按钮被禁用 [英] SQL Express 'new trigger' button is disabled

查看:77
本文介绍了SQL Express的“新触发器”按钮被禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是sql express的新手,我想在我的桌子上创建一个新的触发器。



但是我发现我桌子上的'新触发'按钮文件夹显示已禁用当我右键单击触发器文件夹时,它会显示新触发器按钮被禁用并呈灰色。



我使用SQL EXPRESS 2014和管理工作室2014.有人有任何人想法为什么会这样。



请建议我一些出路。



SHOUTING删除 - OriginalGriff [/ edit]

I am new to sql express and i want to create a new trigger on my table.

But I found that 'New trigger' button in my table's trigger folder shows Disabled. When I right click on trigger folder it shows 'New trigger' button disabled and in gray color.

Iam using SQL EXPRESS 2014 and management studio 2014. Does anybody have any idea why it is happening so.

Please suggest me some way out.

[edit]SHOUTING removed - OriginalGriff[/edit]

推荐答案

You don't need to use the menu item to create a trigger. Just open up a query window and write the create trigger statement there.

To get some help with the syntax you can use a snippet in the editor. Right click on the surface of the query editor and select Insert Snippet and then select Trigger and Create Trigger to get the following code snippet inserted to your editor.




CREATE TRIGGER TriggerName
    ON [dbo].[TableName]
    FOR DELETE, INSERT, UPDATE
    AS
    BEGIN
    SET NOCOUNT ON
    END


我遇到同样的问题。 New Trigger ...菜单项显示为灰色。我也在使用SQL Server 2014 Express。不确定这里发生了什么。
I have the same problem. The "New Trigger..." menu item is greyed out. I'm also using SQL Server 2014 Express. Not sure what's going on here.


这篇关于SQL Express的“新触发器”按钮被禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆