建表空间攻略
create temporary tablespace user_temp tempfile ‘[全路径]‘ size 1G autoextend off;
create tablesspace user_data datafile ‘[全路径]‘ size 1G autoextend off;
create user username identified by password default tablespace user_data temporary tablespace user_temp;
授予系统权限:
grant create session to username;
授予角色权限:
grant dba to username;
授予表权限:
grant select, delete, insert, update on owner.tablename to username;
建表攻略
create table owner.tablename ( UID number not null, ID number not null, TestID number not null, Name varchar2(100 bytes) not null, Name2 varchar2(150 bytes) not null, Describe varchar2(250 bytes) not null default ‘This is value of teesting‘ ) tablespace tablespacename;
create unique index owner.ux_owner_tablename_UID on owner.tablename(UID);
create index owner.ix_owner_tablename_Name_Name2 on owner.tablename(Name, Name2);
create sequence owner.seq_owner_tablename_UID maxvalue 999999999999 start with 2000 increment by 1 cache 1000;
drop table owner.tablename; drop index owner.ux_owner_tablename_UID;
原文:https://www.cnblogs.com/BeauBiu/p/14802591.html