How can I disable update table for all user

爷,独闯天下 提交于 2019-12-11 00:34:16

问题


I use SQL Server 2008 R2 and have a table that I want no one to update, in other words I want to disable updates on this table. For this purpose I know two methods, first is to use instead of update trigger to prevent update and second is to use permissions.

I want to figure out best practices for this purpose.

EDIT 1: I want to deny update for all user.


回答1:


IMHO, using permissions to disable updates to a table is probably the best way to go.

EDIT: Check Giving and removing permissions in SQL Server




回答2:


In MySQL, SQL the i-am-a-dummy flag makes the MySQL, SQL engine deny the UPDATE and DELETE commands unless the WHERE clause is present.



来源:https://stackoverflow.com/questions/11185932/how-can-i-disable-update-table-for-all-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!