oracle创建视图并给用户开放权限

为了让提高查询效率,可以考虑给其他公司用户开放视图的方法.

1.创建必要的视图

create or replace view test_table_v as
  select t1,t2,t3,t4,t5
    from test_table

2.创建要访问该视图的用户

-- Create the user 
create user TEST_USER
  default tablespace JWZH
  temporary tablespace TEMP
  profile DEFAULT;
-- Grant/Revoke role privileges 
grant connect to TEST_USER;

3.给该用户访问视图的权限

grant select on ga_jcxx_rk_syrk_v to test_user

猜你喜欢

转载自ysj5125094.iteye.com/blog/1744820
今日推荐