You can grant column level permissions - think that came in with v2008 but could be wrong Trigger? If you don't want them to be ablle to query the other columns either then a view.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
if update (mycolumn) begin if exists ( select * from inserted i join updated u on i.pk = u.pk and (i.mycolumn <> u.mycolumn or (i.mycolumn is null and u.mycolumn is not null) or (i.mycolumn is not null and u.mycolumn is null)) ) begin rollback tran raiserror ('cannot update column', 16, -1) end end
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
if update (mycolumn) begin if exists ( select * from inserted i join updated u on i.pk = u.pk and (i.mycolumn <> u.mycolumn or (i.mycolumn is null and u.mycolumn is not null) or (i.mycolumn is not null and u.mycolumn is null)) ) begin rollback tran raiserror ('cannot update column', 16, -1) end end
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
nigelrivett,
As I aware of the logical tables of trigger there
are only two tables inserted and deleted.Updated
table is not the logical one .Correct me If I am
wrong ..