ibm db2 column access restrictions

Hi Experts,

I am asking a question on behalf of a friend.  I don't have any experience with IBM DB2, but the question is this:  Can we add a user that only has rights to view the data in specific columns on specific tables?  If yes, can you maybe provide a screenshot or two to show how it's done or at least a vivid enough explanation of how to do it, since I'm working blind to give my friend his answer?

Thanks!
Mike
LVL 1
threadyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
momi_sabagConnect With a Mentor Commented:
you can create a view that selects only this column from the table and grants the user permissions to the view and not to the table
0
 
threadyAuthor Commented:
cool - do you have more specific info on how to create a view in DB2?  Is a view like a table, so that I could do queries on the view's columns?
0
 
momi_sabagConnect With a Mentor Commented:
sure,

create view view_name_comes_here
as
select column_you_want_him_to_see
from table_name_contAInING_That_column
;


grant select on view_name_comes_here to special_username_comes_here;
0
 
threadyAuthor Commented:
thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.