oracle basic sql

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)

發佈了38 篇原創文章 · 獲贊 5 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章