標籤: 先用scott使用者下的emp表做實驗.emp表有個欄位,一個是empno(員工編號),另一個是mgr(上級經理編號)下面是表中所有資料 1select * from emp start with empno=7698 connect by mgr=prior empno; 執行結果如下: 得到的結果是empno=7698的資料,以及會得到mgr=769
標籤:oracle 11g data guar緣起最近做了10g和11g的物理備庫配置實驗,發現 Data Guard 其實很容易,但是缺少好文檔。我是參考官方文檔做的實驗,覺得它寫的不是很清楚的。Google 出來兩個pdf文檔,讀了覺得比官方文檔強很多。翻譯下,也許會對部分朋友有用。翻譯的同時我也好更熟悉下這兩個文檔。好久沒翻譯過英文了,可以順便練練手。原文檔(牆外):Configure Dataguard 11gR2 Physical Standby Part 1Configure
標籤:1、查看使用者的proifle是哪個,一般是default:sql>SELECT username,PROFILE FROM dba_users;2、查看指定概要檔案(如default)的密碼有效期間設定:sql>SELECT * FROM dba_profiles s WHERE s.profile=‘DEFAULT‘ AND
標籤://欄位注釋select * from user_col_comments;//表注釋select * from user_tab_comments; //查詢欄位類型select column_name,data_type,data_length from user_tab_columns where
標籤:查詢使用者的索引select index_name,table_name,tablespace_name,index_type,uniqueness ,status from dba_indexes where owner=‘SCOTT‘;查詢使用者的索引列select index_name,table_name,column_name,index_owner,table_ownerfrom dba_ind_columnswhere
標籤:假設現在有一張學生表student,學生表中有姓名、分數、課程編號,現在我需要按照課程對學生的成績進行排序。select * from student1. rank over ()可以實現對學生排名,特點是成績相同的兩名是並列,如下1 2 2 4 5select name, course, rank() over(partition by course order by score