摘要:
1、查看表占的空間 SELECT t.segment_name, round(SUM(t.bytes/1024/1024/1024),2) FROM user_segments t GROUP BY t.segment_name ORDER BY SUM(t.bytes/1024/1024/1024 閱讀全文
摘要:
--查看鎖死的存儲過程的SESSION_ID SELECT * FROM DBA_DDL_LOCKS WHERE NAME =UPPER('存儲過程名') --獲取 select t.sid, t.serial# from v$session t where t.sid in ( SELECT di 閱讀全文
摘要:
1、基本語法 將多行同列合并展示為一行:LISTAGG(展示字段,分隔符) WITHIN GROUP( ORDER BY 分組維度) 2、解析 with temp as( select '中國' country ,'北京' city from dual union all select '中國' c 閱讀全文
摘要:
1、基本語法 在Oracle中START WITH……CONNECT BY……一般用來查找存在父子關系的數據,也就是樹形結構的數據。 SELECT * FROM TABLE WHERE 條件3 START WITH 條件1 CONNECT BY 條件2; start with [condition] 閱讀全文