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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help me

Author  Topic 

ducletan
Starting Member

25 Posts

Posted - 2010-12-22 : 21:44:34
Mytable (ID char(2),desc nvarchar(20))
ID DESC
00 Manager
99 Other
.
.
.

Give me the way to prevent user from delete rows: (ID='00' or ID='99')

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-12-22 : 22:23:56
Add a trigger that does a rollback when it sees a delete on those rows. Have it do a RAISERROR to let the user know.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ducletan
Starting Member

25 Posts

Posted - 2010-12-23 : 01:53:28
thanks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-12-23 : 15:00:44
You're welcome, glad to help.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -