默认scott没有创建视图的权限。运行时回出现权限不足的问题。
如何给scott添加视图权限,其实很简单
第一步:使用dba权限进入,默认密码随意
第二步:执行语句
grant create any view to scott;
第三步:切换到原有scott帐号,在运行创建视图命令即可。例如
/* 创建视图 */ create or replace view v as select null as c1, null as c2, 1 as c3, null as c4, 2 as c5, null as c6 from dual union all select null as c1, null as c3, null as c3, 3 as c4, null as c5, 2 as c6 from dual;