1、grant create view to B; –授予查询权限 2、grant select any table to B; –授予权限 3、grant select any dictionary to B; __EOF__
Oracle CREATE VIEW syntax To create a new view in a database, you use the following Oracle CREATE VIEW statement: CREATE [OR REPLACE] VIEW view_name [(column_aliases)] AS defining-query [WITH READ ONLY] [WITH CHECK OPTION] Code language: SQL (Structured Query Language) (sql) ...
创建ORACLE视图时报错ORA-01031,表明insufficient privileges (一)现象说明 用户为新建用户test 授予角色:HR_ALL 授予HR_ALL的系统权限是:grant connect,resource to HR_ALL; 授予HR_ALL的对象权限是:无 用test登陆 create view test01 as select * from hr.employees; 报错ORA-01031,表明insufficient privileges (...
create user test01 identified by 123 --查看是否创建成功 select * from dba_users where username = 'TEST01'; --授权登录(会话)权限 grant create session to test01; --默认用户没有任何表,而且不具备操作其他表的权限。 --select * from emp; --授权soctt.emp所有权限(all)给test01 grant all on ...
1、grant create view to B; –授予查询权限 2、grant select any table to B; –授予权限 3、grant select any dictionary to B; 给scott用户授三次不同的权 第五步:使用PLSQL Developer回到scott用户界面再来创建试图就可以 提示创建成功 验证是否创建成功,显示已有创建的试图 在图形化界面查看是否创建成功 ...
在Oracle数据库中,授予用户创建视图的权限可以通过以下步骤实现: 首先,使用具有管理员权限的用户登录到数据库。 授予用户创建视图的权限: GRANT CREATE VIEW TO username; 复制代码 其中,username是要授予权限的用户。 用户可以使用以下语句创建视图: CREATE VIEW view_name AS SELECT column1, column2, ... ...
删除视图者需要是视图的建立者或者拥有DROP ANY VIEW权限。视图的删除不影响基表,不会丢失数据。 [color=red]1.创建简单视图 [/color] 创建图书作者视图。 步骤1:创建图书作者视图: CREATE VIEW 图书作者(书名,作者) AS SELECT 图书名称,作者 FROM 图书; ...
CREATE SEQUENCE --建⽴序列 CREATE SESSION --建⽴会话 CREATE SYNONYM --建⽴同义词 CREATE VIEW --建⽴视图 (2)connect角色:只可以登录Oracle,不可以创建实体,不可以创建数据库结构 2、创建实体的权限(创建表、序列、触发器、存储过程等权限)grant resource to test_user;(1)resource角色包含:C...
Grant create any index to scott; 例:在scott模式下,为emp表的deptno列创建索引。 create index emp_deptno_index on emp(deptno); 复合索引:基于两个列或多个列的索引在同一张表上可以有多个索引,但是要求列的组合必须不同。如: create index emp_idx1 on emp(ename,job); ...
(其他用户以此类推) 解决方法: 以dba用户登录 [sql] 代码如下: sqlplus / as sysdba 赋予scott用户创建VIEW的权限 [sql] 代码如下: grant create view to scott 以scott用户登录oracle [sql] 代码如下: conn scott/tiger 创建视图成功 [sql] 代码如下: CREATE OR REPLACE VIEW myview AS SELECT * FROM emp...