1.创建用户
create user hfy identified by hfy;
2.在该用户下建表
建表必须满足权限和表空间;
首先连接sys账户,grant create session to hfy;//授予对话权限
grant create table to hfy;//授予建表权限
分配表空间:
sys:alter user hfy quota 5m system(users);
创建表:
hfy:create table stu(id int) tablespace system(users);
3.赋予权限给该用户为其他用户建表
grant create any table to hfy;
hfy:create table scott.stu(id int);
4.取消权限
revoke 权限 from hfy;
5.删除用户
drop user hfy cascade;//级联删除该用户的所有资料