Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Grant only for a part of a table?
This is one of the fundamental uses of views. You'll need to join somehow to a
table which relates the user to his orders and use the function USER.
Say you have a table of oracle usernames and customer id's, then the view
should say
where USER=custusers.username and orders.customer_id=custusers.customer_id
or some such.
Then, of course, you do a grant on the view to a role, and grant the role to the users.
Nicolas Bronke wrote:
> Is it possible, to limit grant rights for a table depending on a where
> clause or like that?
>
> E.g. Table Customer and Orders
> Now a customer shall have a look at Orders but limited to his customer Ids.
> Is that possible using any grant option or does I have to create special
> views or have to program it inside the application?
>
> Thanks for any comment.
>
> Regards
> Nicolas Bronke
Received on Thu Oct 28 1999 - 19:31:07 CDT