sqlserver-2005用户未访问删除列的应用程序 [英] sqlserver-2005 application of user not accessing column to delete

查看:101
本文介绍了sqlserver-2005用户未访问删除列的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表,其中有一些列,现在我的问题是我不希望任何用户删除列,请编写一个触发器,使
没有用户将无法删除表中的列,更新的请帮助我

i have a table in that there are some columns ,now my problem is i dont want any user to delete column ,please write a trigger such that
no user will not be able to delete the columns in a table ,iam a fresher please help me

推荐答案

这是一个堆栈溢出问题,其中包含您需要的代码(出现问题):

> http://stackoverflow.com/questions/1247147/how- to-make-ddl-trigger-for-a-specific-table [
Here is a Stack Overflow question that has the code you need (in the question):

http://stackoverflow.com/questions/1247147/how-to-make-ddl-trigger-for-a-specific-table[^]

Basically you create a DDL trigger at the database level that watches the ALTER_TABLE commands. Then, you use the XML EventData to look at which table is being modified and selectively block the action (unless you want to block the modification of every table in your database).


这篇关于sqlserver-2005用户未访问删除列的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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