Reputation: 691
How can I use grant and creation of a view to allow a user to have read only access to certain columns in a table but also be allowed to update only one of the columns?
Can you specify a specific column only for update on a grant?
Upvotes: 2
Views: 4532
Reputation: 70369
So let's say we have a table T with col1...col5 and the user U, he should not see col5 () view needed) and should update col3 (no view needed):
CREATE VIEW V AS SELECT col1, col2, col3, col4 FROM T;
GRANT SELECT, UPDATE (col3) ON V TO U;
see http://www.oracle-dba-online.com/sql/grant_and_revoke_privileges.htm
EDIT: corrected a mistake...
Upvotes: 2