PS:如果你用的是圖形化界面,只需要隨便打開一個sql窗口直接把代碼寫進去運行即可,看情況吧,權限夠用就可以(學習使用).
說明:普通用戶是無法創建其他用戶並且給予權限的,需要sys用戶進行下一步操作:
create user 用戶名 identified by 密碼;
create user Ryan identified by root;
grant create session to 用戶名;
grant create session to Ryan;
grant 權限 tablespace to 用戶名;
grant unlimited tablespace to Ryan;
grant create tablespace to Ryan;
grant alter tablespace to Ryan;
grant drop tablespace to Ryan;
grant manage tablespace to Ryan;
grant create table to 用戶名;
grant create table to Ryan;
grant create view to 用戶名;
grant create view to Ryan;
grant create trigger to 用戶名;
grant create trigger to Ryan;
grant create procedure to 用戶名;
grant create procedure to Ryan;
grant create sequence to 用戶名;
grant create sequence to Ryan;
grant debug connect session to 用戶名
grant debug connect session to study;
查看當前用戶所有的表:
select * from user_tables;