system:
create user xiaoming identified by m1223;
连接权限
grant create session to xiaoming;
连接
conn xiaoming/m1223;
查询权限
grant select on scott.emp to xiaoming;
建表权限
grant create table to xiaoming;
插入记录权限
alter user xiaoming quota 10m on users;
权限的传递
create user rose identified by r123;
授予xiaoming为用户授予连接权限的权限
grant create session to xiaoming with admin option;
撤销权限
revoke create session from xiaoming;
查看权限
select * from session_privs;
scott:
scott将修改表的权限给xaioming用户
grant update on emp to xiaoming;
scott将对emp表的查询,插入,删除和修改的权限给xiaoming
grant select,insert,delete,update on emp to xiaoming;
grant all on emp to xiaoming;
如果只允许rose修改emp表的工资列,该怎么操作
grant update(sal) on emp to xiaoming;
grant update(sal) on emp to xiaoming with grant option;
如果给数据库中所有用户分配相同的权限,该怎么操作
grant update(sal) on emp to public;
在一个学生管理系统中,教师teacher01可以查询学生(student表)的所有信息,并可以修改学生成绩(score列)。学生student01可以查看学生信息。
主任director01可以添加和删除学生。请问该如何为teacher01 student01 director01授予相应权限。
create table student(sid number,sname varchar2(10),score number(5,2));
insert into student values(11,‘aa’,96);
insert into student values(12,‘aa’,96);
insert into student values(13,‘aa’,96);
create user teacher01 identified by m123;
create user student01 identified by m123;
create user director01 identified by m123;
grant select,update(score) on student to teacher01;
grant select on student to student01;
grant insert,delete on student to director01;