Here's an example:
CREATE TRIGGER xy
FOR DELETE, UPDATE
WHERE lock = 1
RAISERROR('cannot update rows with lock = 1', 16, 1)
Vyas, MVP (SQL Server)
What hardware is your SQL Server running on?
"Rafael Wittek" <de> wrote in message
I want to implement a row-locking or row-write-protect mechnism, that
prevents certain rows of a table (e.g. that ones with lock (bit)=1) to be
modified or deleted.
I think the best way is to this by triggers, but how ?
this one doesn´t work
create trigger xy on table test
for update, delete
if lock=1 then