oracle筆記:where 子句,串連,事務,體系概述的小知識點

來源:互聯網
上載者:User

在where條件中使用like操作符
萬用字元“%”用於表示0個或多個字元,而“_”用於表示單個字元。
eg: where ename like 'S%';
在where 條件中使用in操作符
eg: where sal in (1000,2000);
使用merge語句修改資料
merge into table1 using table2 on expression
when matched then update...
when not matched then insert...;
內串連
select table1.column,table2.column from table1 [inner] join table2 on table1.column=table2.column2;
外串連 :是內串連的擴充,不僅會返回滿足串連條件的所有記錄,也會返回不滿足條件的記錄。
select table1.column,table2.column from table2 [left|right] outer join table2 no table1.column1=table2.column2;
左外串連 eg: where table1.column1=table2.column(+);
事務的開始與結束
開始:
1.串連到資料庫,執行一條DML語句(INSERT,UPDATE或DELETE);
2.前一個事務結束後,又輸入一個DML語句;
事務結束:
1.執行COMMIT或ROLLBACK 語句
2.執行DDL語句,如CREATE TABLE 語句,會自動執行COMMIT語句;
3.斷開與資料庫的串連;
4.執行一條DML語句,卻失敗了。會自動ROLLBACK。
文法:SAVEPOINT savepoint_name;
   ROLLBACK TO SAVEPOINT savepoint_name;
資料檔案:指儲存資料庫資料的檔案。
瞭解資料檔案的資訊:
desc dba_data_files;
控制檔案:是一個很小的二進位檔案,用於描述資料庫的物理結構。
瞭解控制檔案的資訊:
select name from v$controlfile;
重做記錄檔:指記錄資料庫中所有修改資訊的檔案。
瞭解系統當前正在使用哪個記錄檔組。
select group#,members,status from v$log;
手工切換日誌:alter system switch logfile;
Oracle 進程結構
系統全域區與Oracle 進程的組合稱為Oracle 資料庫執行個體。
Oracle 執行個體的後台進程主要有如下幾種:
1.資料庫寫入進程DBWn.
2.日誌寫入進程
3.檢查點進程
4.系統監控進程
5.進程監控進程
6.歸檔進程
7.恢複進程
8.封鎖進程
9.調度進程
10.快照進程

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.