Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
hi All I have an administrator account in my users table, I want to restrict user delete or update (modify) this account, how can I write a trigger to do that ? Here is missing my statement :
CREATE TRIGGER UnModify_Admin_Account ON Users AFTER DELETE,UPDATEAS BEGIN SET NOCOUNT ON;// if username is 'Administrator' RAISERROR and return @@ERRORENDGO