日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
詳解Oracle解鎖相關(guān)過程

在這里我們將介紹Oracle解鎖的步驟,包括具體的代碼以及操作,希望本文能為大家在Oracle數(shù)據(jù)庫(kù)管理工作中,有所幫助。

創(chuàng)新互聯(lián)專注于遷西企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站開發(fā),商城開發(fā)。遷西網(wǎng)站建設(shè)公司,為遷西等地區(qū)提供建站服務(wù)。全流程按需規(guī)劃網(wǎng)站,專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)

 
 
 
  1. from v$locked_object t1,v$session t2  
  2. where t1.session_id=t2.sid order by t2.logon_time; 

解鎖

 
 
 
  1. --alter system kill session 'sid,serial'   
  2.  alter system kill session '146,21177'; 

鎖表 --lock table tb_name in 模式

Null空值

 
 
 
  1. Null and false ->false 
  2. Null and true-> null 
  3. Null or false ->null 
  4. Null or true->true 

組函數(shù)忽略空值

空值排序時(shí)大于任何值,且不能被索引。

 
 
 
  1. Merge into 
  2. MERGE [hint] INTO [schema .] table [t_alias] USING [schema .]  
  3. table | view | subquery } [t_alias] ON ( condition )  
  4. WHEN MATCHED THEN merge_update_clause  
  5. WHEN NOT MATCHED THEN merge_insert_clause; 

例:

 
 
 
  1. merge into acct a  
  2. using subs b  
  3. on (a.msid = b.msid)  
  4. when MATCHED then 
  5.  update set a.areacode = b.areacode  
  6. when NOT MATCHED then 
  7. insert (msid, bill_month, areacode) values (b.msid, '200702', b.areacode) 

10g中增強(qiáng)一:條件操作 where

WHEN MATCHED THEN ...where ...

10g中增強(qiáng)二:刪除操作

 
 
 
  1. An optional delete where clause can be used to clean up after a merge operation. Only those rows which match both the ON clause and the DELETE WHERE clause are deleted  
  2.  merge into acct a   
  3.  using subs b on (a.msid=b.msid)  
  4.  when MATCHED then 
  5. update set a.areacode=b.areacode  
  6.  delete where (b.ms_type!=0); 

其中滿足 (b.ms_type!=0) 的將被deleted

With 語(yǔ)句

with語(yǔ)句只能用在select語(yǔ)句中,update和delete不支持

 
 
 
  1.  with summary as(  
  2. select dname, sum(sal) as dept_total  
  3. from ct_emp, ct_dept  
  4.  where ct_emp.deptno = ct_dept.deptno  
  5.  group by dname)  
  6. select dname, dept_total  
  7. from summary  
  8.  where dept_total > (select sum(dept_total) * 1 / 3 from summary);  

臨時(shí)表temporary table

1、臨時(shí)表需要先創(chuàng)建,不建議在運(yùn)行時(shí)使用DDL語(yǔ)句創(chuàng)建

2、臨時(shí)表可以看作是一張普通的物理表, 但它的數(shù)據(jù)是會(huì)話隔離的

區(qū)別之處:

l 向表中插入數(shù)據(jù)只在會(huì)話或事務(wù)期間存在

l 表中的數(shù)據(jù)只對(duì)插入數(shù)據(jù)的會(huì)話是可見的

l 可用ON COMMIT指導(dǎo)定數(shù)據(jù)是會(huì)話專用還是事務(wù)專用

 
 
 
  1. create global temporary tablename(column list)   
  2.  on commit preserve rows; --提交保留數(shù)據(jù)會(huì)話臨時(shí)表   
  3. on commit delete rows; --提交刪除數(shù)據(jù) 事務(wù)臨時(shí)表  

oracle的臨時(shí)表和sql server不一樣,在使用完成以后,oracle臨時(shí)表中的紀(jì)錄可以被定義為自動(dòng)刪除(分session方式和transaction方式),而表結(jié)構(gòu)不會(huì)被自動(dòng)刪除;sql server中的臨時(shí)表在使用后會(huì)被完全刪除。

建議:不得已的情況下(比較復(fù)雜的數(shù)據(jù)處理)才使用臨時(shí)表,否則盡可能使用子查詢代替或使用游標(biāo)。

NVL,NVL2區(qū)別及NULLIF 的使用

| NVL(expr1, expr2):expr1為NULL,返回expr2;不為NULL,返回expr1。

| NVL2 (expr1, expr2, expr3) :xpr1不為NULL,返回expr2;為NULL,返回expr3。expr2和expr3類型不同的話,expr3會(huì)轉(zhuǎn)換為expr2的類型

| NULLIF (expr1, expr2):相等返回NULL,不等返回expr1


網(wǎng)頁(yè)題目:詳解Oracle解鎖相關(guān)過程
文章網(wǎng)址:http://www.dlmjj.cn/article/cosgooj.html