標籤:oracle今天無聊翻騰剛畢業時的電腦,發現11年在單位實習時的一些練習題及考核試題和答案,現在在此記錄一下,方便以後查閱。考核一:--1、列出薪金比"SMITH"多的所有僱員 select * from emp where sal > (select sal from emp where ename=‘SMITH‘);--2、找出傭金高於薪金60%的僱員 select * from
標籤:SQL> set autotraceUsage: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]SQL> set autotrace onSP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabledSP2-0611: Error enabling STATISTICS reportSQL>
標籤:使用scott賬戶下的dept表;select * from dept order by deptno;10 ACCOUNTING NEW YORK20 RESEARCH DALLAS30 SALES CHICAGO40 OPERATIONS BOSTON為了示範方便,插入一條資料:insert into dept(deptno, dname, loc) values(50,‘SYSTEM‘, ‘NEW YORK‘);新插入的記錄為:50 SYSTEM NEW
標籤:database oracle 資料庫 close 3.oracle資料庫的分階段關閉3.1 將資料庫從open狀態置於mount狀態SQL> alter database close;Database altered.關閉掉所有的資料檔案和記錄檔3.2 卸載資料庫,從mount狀態置於nomount狀態SQL> alter database
標籤:Row Share (RS)This lock, also called a subshare table lock (SS), indicates that the transaction holding the lock on the table has locked rows in the table and intends to update them. A row share lock is the least restrictive mode of table lock,
標籤:1 動態sql即拼接字串的sql,使用變數代替具體值,10萬條語句可以被hash陳一個SQL_ID,可以只解析一次for i in 1..100000 loop execute immediate‘insert into t values(:x)‘ using i;end loop;commit; commit是對log及事物的操作,不是寫資料的動作,寫資料是由CKPT進程決定的2 create table跳過資料緩衝區,直接寫入磁碟,適合海量遷移insert into t select