oracle資料庫簡單操作

2021-07-02 05:48:29 字數 940 閱讀 1231

cmd ==>sqlplus==》使用者名稱/密碼@orcl(全域性資料庫名),如果是sys使用者登入的話,要輸入==>使用者名稱/密碼@orcl as sysdba

建立表空間

create tablespace 表空間名

datafile 『資料庫檔案存放的路徑』

size 表空間大小

autoextend on

例如:create tablespace buaa

size 100m

autoextend on

如何建立使用者

create user 使用者名稱

identified by 密碼

default tablespace 預設的表空間名

temporary tablespace 臨時表空間名

例如:create user nay

identified by nay2flora

default tablespace buaa

給使用者賦許可權

grant connect(連線許可權),dba(資料庫管理許可權),resource(資源許可權) to 使用者名稱

例如:grant connect,dba to nay

如何建立資料庫表

create table 表名(

欄位一 資料型別(長度),

欄位二 資料型別(長度),

。。。。。。

)例如;

create table student(

id varchar2(),

name

varchar2(),

age

number,

birth

date

)建立序列號

create sequence *** increment by 1

start with 1001 

maxvalue 999999

oracle資料庫簡單操作

create tablespace database1 datafile d database1.dbf size 20m logging create user user2 identified by tiger default tablespace database1 create direct...

oracle資料庫操作

1 oracle安裝目錄,配置目錄 通過環境變數查詢 set grep oracle 網路配置在 oracle home network admin tnsnames.ora 2 oracle資料庫 select from v database 3 oracle表 4 oracle 工具 linux...

Oracle資料庫操作。

物件導向告一段落,重新撿起來sql server的知識,幸好資料庫語言都差不多,讓我重新學習oracle的時候並沒有想象中的費勁,只需要複習起來舊知識,再融合oracle特有的語法就足矣。廢話不多說,進入正題,此文章按照網上的資料 個人理解編寫,盡量做到通俗易懂,以便日後忘了能夠見文知意。注 sql...