oracle基礎操作

2021-09-01 04:29:16 字數 762 閱讀 1649

資料匯出:

1 將資料庫test完全匯出,使用者名稱system 密碼manager 匯出到d:\daochu.dmp中

exp system/manager@test file=d:\daochu.dmp full=y

2 將資料庫中system使用者與sys使用者的表匯出

exp system/manager@test file=d:\daochu.dmp owner=(system,sys)

3 將資料庫中的表table1 、table2匯出

exp system/manager@test file=d:\daochu.dmp tables=(table1,table2)

4 將資料庫中的表table1中的字段filed1以"00"打頭的資料匯出

exp system/manager@test file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"

資料的匯入

1 將d:\daochu.dmp 中的資料匯入 test資料庫中。

imp system/manager@test file=d:\daochu.dmp

上面可能有點問題,因為有的表已經存在,然後它就報錯,對該錶就不進行匯入。

在後面加上 ignore=y 就可以了。

2 將d:\daochu.dmp中的表table1 匯入

imp system/manager@test file=d:\daochu.dmp tables=(table1)

Oracle基礎操作

一 sys使用者和system使用者 oracle安裝會自動的生成sys使用者和system使用者 1 sys使用者是超級使用者,具有最高許可權,具有sysdba角色,有create database的許可權,該使用者預設的密碼是change on install 2 system使用者是管理操作員...

oracle 之 基礎操作

刪除存在的表空間及資料 drop tablespace ts yygl including contents and datafiles 若是出現了提示 錯誤 導致無法全部刪除,那麼就執行以下語句可以得到那些表有主鍵相關,再執行就可以 select alter table owner table n...

ORACLE基礎 3 操作表

新增資料 insert into table name column1,column2,values value1,value2,表名和值必須對應,如果在所有欄位都新增值,表名可以省略 後面順序必須匹配 舉例 insert into userinfo values 1,123 126.com sys...