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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 My Question - updating chosen row wtih an Update Trigger.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-12-17 : 06:42:26
Brucenx writes "Hi SQLteam:
My question is, Ihave a talbe with 3 columns, (col1,col2, and col3),I want to write a trigger so that when an INSERT, UPDATE, DELETE is performed, it would not allow anychange made to col1, however, CHANGE on other two columns should be allowed.How can i use roolback with it?

eg. StudentID, FirstName, LastName.
update Students
set StudentID =2, FirstName =Bruce, LatName =Wang
where StudentID=1

then, the result should be:
1, Bruce, Wang





brucenx"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-12-17 : 07:19:13
use "instead of" trigger for this.

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -