Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: grant update on a table except to the key fields ?
Jean-Luc Martou <martou_at_sia.ucl.ac.be> wrote:
>Hi!
>
>Question :
>
>When a user is granted to update a table, he can modify all the
>fields in this table, included the fields in the primary key.
>
>How is it possible to revoke the right to modify the key fields ?
>
>Jean-Luc Martou
>
>Project Manager
>Service d'informatique administrative (SIA)
>Universite catholique de Louvain
>Place de l'Universite 1 Tel : 32-(0)10-47.81.57
>B-1348 Louvain-La-Neuve Fax : 32-(0)10-47.35.71
>Belgium
>
>Acknowledge-To: <Martou_at_sia.ucl.ac.be>
>
You can do this with a trigger that when updating checks for the OLD and NEW values of the key fields....if OLD.keyfield is <> NEW.keyfield then deny the action and rollback....The trigger can also check for the username performing the action and allow specified users the update right....
The code design is up to you.....read docs on triggers.....
Hope it helps,
.
Received on Fri Jul 17 1998 - 09:01:04 CDT
![]() |
![]() |