一、選擇題 1.當你執行以下查詢語句: SELECT empno,ename FROM emp WHERE empno =7782 OR empno =7876; 在WHERE語句中,以下哪個操作符可以取代OR? A. IN B. BETWEEN ……and C. LIKE D. <= E. >= 2. 哪個實現 IF..THEN…ELSE 邏輯? A. INITCAP() B. REPLACE() C. DECODE() D. IFELSE()
在上次基礎上,添加空值判斷:一.直接判斷select case when s1 is null then s1 when s2 is null then s1 when s3 is null then greatest(s1,s2) when s4 is null then greatest(s1,s2,s3) when s5 is null then greatest(s1,s2,s3,s4) when s6 is null then greatest(s1,s2,s3,s4,s5)
Microsoft Windows 2000 [Version 5.00.2195](C) 著作權 1985-2000 Microsoft Corp.C:/Documents and Settings/Administrator>sqlplus /nologSQL*Plus: Release 9.2.0.6.0 - Production on 星期三 8月 1 11:42:37 2007Copyright (c) 1982, 2002, Oracle Corporation. All
在OCP 007裡有類似如下的題目: Q: 141 Evaluate this SQL statement:SELECTe.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAMEFROM EMPLOYEES e, DEPARTMENTS dWHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID; In the statement, which capabilities of a SELECT
--------Creating Physical Standby Database---------------------------------------Settings for the primary database--------------------------------1、Enable Forced LoggingALTER DATABASE FORCE LOGGING;2、Create a Password Fileorapwd
-- get all dictionary for oracle dbselect * from dict;--select * from dictionary;-- get all columns for dictionarysselect * from dict_columns;-- get the default name-space for current userselect username,default_tablespace from user_users;-- get
ORACLE 9IAS的Enterprise Manager web Console進入之後一片空白,無任何顯示,也不報錯。重新啟動HTTP SERVER,對這種現象無任何影響。順序起停ORACLE有關自動啟動並執行服務,也沒有協助。進入命令提示字元下,找到Enterprise Manager web Console的執行檔案:D:/ora9is/sysman/emd/emctl直接運行該命令會出現其命令協助,這裡不再贅述。a、使用emctl
前些日子做了個資料分組後重新排序的報表。是用crystal指令碼寫的,先設定一個全域變數,讓其自加,然後在每一個group head裡面清零。代碼很簡單,我就不貼了。過段日子,有同事求一個分組後重新排序的語句,他以為我的報表是用類似的sql做的。其實如果用oracle的話,rank函數也可以實現分組後重新排序。RANK FunctionThe RANK function produces an ordered ranking of rows starting with a rank of
也不說那麼複雜的了 直接上代碼 實現 自增欄位 用pl/sql dev 建立一個表,欄位名 id,類型number() 用 pl/sql 建立一個sequence 這個我就不多說了 直接 圖形化操作就可以實現 然後自己編寫觸發器,其實觸發器也可以 圖形化操作,但是還是要自己填寫代碼來實現 所以直接寫代碼了 create or replace trigger xxxx_tbefore insert on xxxx for each row begin select
1.變數賦值 create or replace procedure pro_testis type v_a_count is record( a NUMBER, b varchar2(50));v_a_countInfo v_a_count; ---------這個需要注意beginselect a,b into v_a_countInfo from a_count ;
轉:http://jzhua.javaeye.com/blog/182767 昨天晚上,回去好好整理了下關於"Oracle資料庫提供了幾種不同資料庫啟動和關閉方 式",然後,自己就回去就寫了個樣本. 其中,就出現了1個問題: ORA-12528: TNS:listener: all appropriate instances are blocking new connections 於是到網上就大量的查閱資料,哈哈,好不錯,解決方案找到了.其中紅色的就是主要解決方案.