標籤:oracleSQL> create table test as select * from dba_objects where rownum<1001;Table created.SQL> create index idx_test on test(object_id);Index created.SQL> select file_id, block_id, blocks from dba_extents where owner = ‘LILC‘ and
標籤:Oracle 伺服器啟後,使用Toad 用戶端串連oracle 時候,遇到下面的錯誤:oracle ORA-12514: TNS: no listenerTNS: listener does not currently know of SID give in connect descriptor 第一步:啟動TNS監聽[[email protected] ~]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0 -
標籤:?1.索引使用原則?不要對索引使用全模糊,但是 LIKE ‘asdf%‘是可以的,即不要Contains,可用StartWith不要對索引進行函數,運算式操作,或者使用is null判斷,否則將會使用全表掃描不等於也會造成全表掃描,使用column < ‘a‘ or column > ‘a‘ 來替代如果一個列有索引,另一個無索引,那麼 c1 or c2
標籤:1.文法結構:select…start with…connect by…prior例如:有一個單位(unit)表 有三個欄位 ID ,NAME,PARENTID(單位ID,單位名稱,上級的單位ID) 1.1 查詢該單位下面的所有單位select t.id,t.name,t.parentid from unit t start with t.id=‘單位的ID‘ connect by prior t.id=
標籤:execute the following commands by using system account login oracle: >sqlplus system/[email protected]:1522/xe;SQL*Plus: Release 12.1.0.1.0 Production on Tue Sep 22 20:16:29 2015Copyright (c) 1982, 2013, Oracle. All rights reserved.