create user username identified by password
default tablespace TS_TAB_001 //指定默认表空间
temporary tablespace TEMP
profile DEFAULT
quota unlimited on ts_tab_001 //赋予用户可以管理这两个表空间:
quota unlimited on ts_tab_002;
-- Grant/Revoke role privileges
grant connect to uname;
grant resource to uname;
如果我们的建表的语句如下,则表建在了默认表空间中也就是ts_tab_001中
create tableTEST
(
IDNUMBER not null,
NAME VARCHAR2(10)
);
如果我们的建表的语句如下,则表建在了默认表空间中也就是ts_tab_002中,因为它指定了表空间,(当然是用户可以管理的表空间)
create tableTEST
(
IDNUMBER not null,
NAME VARCHAR2(10)
)
tablespace ts_tab_002
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
网友评论