大家好我在学习oracle时
用create view创建视图老显示这个,不知道怎么处理
SQL> create or replace view simple_productinfo_view
2 as
3 select productid,productname,productprice,category,origin
4 from productinfo
5 where origin='中国'
6 and rownum < 6;
create or replace view simple_productinfo_view
*
第 1 行出现错误:
ORA-01031: 权限不足
书上说在当前用户下创建视图需要create view系统权限,这里直接给当前用户赋予了DBA权限,这话我不是很理解啊
用grant create view to scott也显示
SQL> grant create view to scott;
grant create view to scott
*
第 1 行出现错误:
ORA-01031: 权限不足
用create view创建视图老显示这个,不知道怎么处理
SQL> create or replace view simple_productinfo_view
2 as
3 select productid,productname,productprice,category,origin
4 from productinfo
5 where origin='中国'
6 and rownum < 6;
create or replace view simple_productinfo_view
*
第 1 行出现错误:
ORA-01031: 权限不足
书上说在当前用户下创建视图需要create view系统权限,这里直接给当前用户赋予了DBA权限,这话我不是很理解啊
用grant create view to scott也显示
SQL> grant create view to scott;
grant create view to scott
*
第 1 行出现错误:
ORA-01031: 权限不足
然后进行授权grant create any view to scott;
grant create any view to scott;
这样scott就可以创建视图了