----创建表空间
create tablespace test_tableSpace
datafile 'D:\oracleDatabase\db\test_tableSpace.dbf'
size 200M
default storage
(initial 200m
next 50m
minextents 20
maxextents 500)
online;
----删除表空间
DROP TABLESPACE test_tableSpace INCLUDING CONTENTS AND DATAFILES
----创建用户()
CREATE USER shanshan PROFILE DEFAULT IDENTIFIED BY shanshan DEFAULT
TABLESPACE test_tablespace TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
----给用户分配权限(shanshan用户名)
grant connect,resource to shanshan;
这样就可以登录了。
用PL/SQL Developer登录
Username :shanshan
password :shanshan
database :zzn
connect as :normal
----创建数据表
create table test_user(
first_name varchar2(15),
last_name varchar2(20)
);
----插入一条记录
insert into test_user values ('zhao','zhaonan');
----查询记录
select * from test_user;