zoukankan      html  css  js  c++  java
  • 关于自关联2

    SQL> select  t3.program,t2.sid,t2.ID1,t2.ctime
       from 
            (select sid, type, id1, id2, lmode, request, ctime
               from v$lock
              where sid in (select sid
                              from v$lock
                             where TYPE = 'TX'
                               and LMODE = 6)
                               and type='TM') t2,
            v$session t3
      where t2.sid = t3.sid;  2    3    4    5    6    7    8    9   10   11  
    
    PROGRAM 						SID	   ID1	    CTIME
    ------------------------------------------------ ---------- ---------- ----------
    sqlplus@june (TNS V1-V3)				  1	 75517	     6713
    sqlplus@june (TNS V1-V3)				 38	 75206	     1584
    
    -------------------------------------------------------------------------------------
    
    SQL>  select  t3.program,t1.sid,t1.ID1,t1.ctime
       from v$lock t1,(select sid
                              from v$lock
                             where TYPE = 'TX'
                               and LMODE = 6
                               group by sid) t2,v$session t3
                               where 
                               t1.sid = t3.sid
                               and t2.sid=t1.sid
                               and t1.type='TM';
                              2    3    4    5    6    7    8    9   10  
    PROGRAM 						SID	   ID1	    CTIME
    ------------------------------------------------ ---------- ---------- ----------
    sqlplus@june (TNS V1-V3)				  1	 75517	     6718
    sqlplus@june (TNS V1-V3)				 38	 75206	     1589
    

  • 相关阅读:
    大三寒假生活19
    大三寒假生活18
    大三寒假生活17
    大三寒假生活16
    大三寒假生活15
    大三寒假生活14
    MySQL 字符集与比较规则
    Python ord & chr
    CentOS7 通过 devstack 安装 OpenStack
    Python *args & **kwargs
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13352431.html
Copyright © 2011-2022 走看看