2014年11月5日 星期三

oracle 對特定欄位作授權的方式


 SELECT 授權 
The following test granting select access to a specified table column.
connect pubs/pubs;

drop user fred;
create user fred identified by fred;
grant connect, resource to fred;

drop view temp;

create view
   temp
as
select
   price
from
   titles;

grant select on temp to fred;

connect fred/fred

select price from pubs.temp;

http://www.dba-oracle.com/class_audit/select_grant_on_specific_table_column.htm



  INSERT, UPDATE, and REFERENCES

Only INSERT, UPDATE, and REFERENCES privileges can be granted at the column level. When granting INSERT at the column level, you must include all the not null columns in the row.

GRANT  update (emp_name)
ON  edwin.emp
TO  joan;


http://www.dba-oracle.com/concepts/column_privileges.htm