標籤:1.函數create or replace function get_Destroy_no return varchar2 is Result varchar2(50);begin SELECT max(destroy_no) INTO RESULT FROM t_oms_device_destroy WHERE substr(destroy_no,0,8)= to_char( SYSDATE ,‘yyyymmdd‘); IF (RESULT =‘‘OR RESULT IS
標籤:配置:資料庫oracle10.2;伺服器作業系統centos5.5;客戶機作業系統win7 32位;plsql版本10.0.5配置前提必須關閉客戶機與伺服器作業系統的防火牆,否則會出現“連線逾時”的提示,plsql無法串連資料庫。centos 查看防火牆狀態與關閉防火牆:service iptables status ; service iptables stop;1,先到Oracle網站下載Instant Client
標籤:今天用到了Oracle表的分區,就順便寫幾個例子把這個表的分區說一說:一、建立分區表1、定界分割根據資料表欄位值的範圍進行分區舉個例子,根據學生的不同分數對分數表進行分區,建立一個分區表如下:create table range_fraction ( id number(8), name varchar2(20), fraction number(3), grade number(2))partition by range(fraction)( partition
標籤:select prod.amount,prod.plansum,(prod.plansum-prod.amount) as borrow,d.enum_value from ----結果集相減(select t.Quo_Prod_List_Price * t.QUO_PROD_VOLUME as amount ,----列值相乘 t.quo_prod_plan_cost * t.quo_prod_volume as
標籤:ORACLE 預存程序的基本文法如下:create or replace procedure 預存程序名(參數) is或as聲明參數begin代碼end 預存程序名。其中or replace代表如果沒有此預存程序則建立,如果有的話則更新預存程序。下面是一個預存程序的簡單例子:create or replace procedure Vid_UnRegStateNoCharging( pTelno in varchar2, pClass in number, pVid in
標籤:查看字元集:select * from v$nls_parameters;select * from nls_database_parameters;修改字元集:sqlplus "/as sysdba"shutdown immediate;startup mount;alter session set sql_trace=true; alter system enable restricted session;alter system set
標籤:database oracle --資料庫名的查看 select name from v$database;650) this.width=650;" src="%5C" alt="spacer.gif\"" />--執行個體名的查看 show parameter instance_name;650) this.width=650;"
標籤:database oracle --資料庫名的查看 select name from v$database;650) this.width=650;" src="%5C" alt="spacer.gif\\"\"" />--執行個體名的查看 show parameter instance_name;650)