對於Oracle中沒有 if exists(...) 的文法,目前有許多種解決方案,這裡先分析常用的三種,推薦使用最後一種第一種是最常用的,判斷count(*)的值是否為零,如下declare v_cnt number;begin select count(*) into v_cnt from T_VIP where col=1; if v_cnt = 0 then dbms_output.put_line('無記錄'); end
Technorati 標籤: oracle--以SYS使用者建立目錄dir_dump,檔案就儲存在這個目錄下SQL> create directory dir_dump as '/data/cmssdb';Directory created.--授權對應的操作帳號讀和寫的許可權,這裡是operatorSQL> grant read on directory dir_dump to operator;Grant succeeded.SQL> grant write on
• Top Print Reply Alert Moderator SubjectConnection To SDE ORACLE AuthorMourad AbuSall DateJun 25, 2007 Messagei created this code to connect on geodatabase sde and this code not working i don't know why!!. what i do for this ?
某種意義上也可以說是 sqlserver 和 mysql 的常用函數對比。數學函數 1.絕對值 S:select abs(-1) value O:select abs(-1) value from dual 2.取整(大) S:select ceiling(-1.001) value O:select ceil(-1.001) value from dual 3.取整(小) S:select floor(-1.001) value O:select floor(-1.001
create user [username] identified by [password] 建立新的使用者 grant 許可權1、許可權2...to 使用者 給建立使用者權限 ex:grant create session to [username] 此時只能串連到資料庫 grant connect,resource to [username] 此時許可權能滿足要求 alter user [username] identified by [password] 修改使用者密碼
今天看了SQL COOKBOOK中的一個例子,其中看到了兩個函數Replace和Translate時產生了疑惑,感覺這兩個函數的作用是一樣的,書上面的例子也看的不是很明白,Google了一下,看了Oracle的官方解釋,終於徹底明白了。官方的解釋如下:REPLACEDescription of the illustration replace.gifPurposeREPLACE returns char with every occurrence of search_string