问题
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