问题描述
我想授予使用者只能编辑表格中的一个栏。我在这里使用什么命令?我使用oracle 11g数据库。我alrdy知道我怎么能授予只读或删除整个表,但我该如何做只有一列或更多?例如,您要授予对ename列的更新权限,然后提供以下语句(例如,如果您希望仅对ename列授予更新权限,则可以使用以下语句):
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 whole table but how do I do it for only one column or more? pls give an example.
推荐答案
其中xyz是用户名)
grant update (ename) on emp to xyz;
语法:
grant update(column-name) on table-name to user-name
strong> EDIT:(用于授予select权限)
(for granting select privilege)
将emp表上的select语句授予XYZ并使XYZ能够进一步传递此权限你必须像这样在GRANT语句中赋予WITH GRANT OPTION子句。
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;
此外,
例如,您希望授予对ename列的更新权限,并插入权限on empno和ename列,您可以这样做:
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;
这篇关于仅授予表中一个列的alter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!