Grant alter on only one column in table

后端 未结 2 1600
慢半拍i
慢半拍i 2021-02-12 20:14

I want to grant a user only to edit one column in my table. What command do I use here? I use the oracle 11g database. I alrdy know how I can grant only read or delete on the wh

2条回答
  •  一个人的身影
    2021-02-12 20:59

    For example, you want to grant update privilege on ename column only, then give the following statement (where xyz is the username)

    grant update (ename) on emp to xyz;
    

    Syntax:

    grant update(column-name) on table-name to user-name
    

    EDIT: (for granting select privilege)

    To grant select statement on emp table to XYZ and to make XYZ be able to further pass on this privilege you have to give WITH GRANT OPTION clause in GRANT statement like this.

    grant select on emp to xyz with grant option;
    

    Also, For example you want to grant update privilege on ename column only and insert privilege on empno and ename columns only, you can do this:

    grant update (ename),insert (empno, ename)  on emp to xyz;
    

提交回复
热议问题