1.創建表空間跟用戶
create tablespace perp
datafile 'C:\perp.ora'
size 1000m
create user perp identified by perp default tablespace perp quota 500m on users;
修改密碼alter user perp identified by perp
grant all privileges to perp
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES;
2.修改表空間
alter table tablename move tablespace spaceTwo
3.創建表
create table test
(
id varchar(10) not null,
name varchar(10) not null
)
insert into test(id, name) values ('1', 'kevin')
4.修改表名
alter table tb_police_officer rename to police_officer
5.加主鍵
alter table vst_comment add primary key(cId)