tags:

views:

33

answers:

1

I have a DB2 table with column "comments" that I would like to allow a user to have update access to, without giving them update access to the whole table.

I suspect that the answer will involve a view. However, in order to make the view relevant, won't I need to expose the primary key to the view? Won't the user then be able to update the primary key, as well as the "comments" column?

+1  A: 

You can limit the scope of UPDATE access by specifying a list of columns.

GRANT UPDATE(comments)
ON TABLE my_table
TO USER some_user;

Grant table, view, or nickname privileges statement

Leons
Thank you, Leons! I was unaware that DB2 allowed column-level security like that and must have overlooked it that first time I scanned the manual. I see it now! Thank you very much!
NeutralAngel