一.官網的說明http://download.Oracle.com/docs/cd/E11882_01/server.112/e26088/functions088.htm#SQLRF00658PurposeThe LENGTH functionsreturn the length of char. LENGTH calculates length usingcharacters as defined by the input
先看看錶中的內容select name,pass from t1;2.方法一--使用decode函數select name,decode(pass,'pass111','密碼1','pass222','密碼2','','密碼為空白') from t1;注意:decode函數中如果你沒列出可能的情況,他就預設為空白3.方法二--使用nvl函數select name,nvl(pass,'密碼為空白') from t1;nvl函數只對查詢為空白的情況賦值4.方法三--使用case xxx&
RANK ( ) OVER ( [query_partition_clause] order_by_clause )DENSE_RANK ( ) OVER ( [query_partition_clause] order_by_clause )可實現按指定的欄位分組排序,對於相同分組欄位的結果集進行排序,其中PARTITION BY 為分組欄位,ORDER BY
create table test1(id number,name varchar2(20));create table test2(id number,name varchar2(20));create table test3(id number,name varchar2(20));1. t1中沒有顯示commit;create or replace procedure t1as begin for i in 1..10000 loop
一般的相等串連: select * from a, b where a.id = b.id; 這個就屬於內串連。 對於外串連: Oracle中可以使用“(+) ”來表示,9i可以使用LEFT/RIGHT/FULL OUTER JOIN LEFT OUTER JOIN:左外關聯 SELECT e.last_name, e.department_id, d.department_name FROM employees e LEFT OUTER JOIN departments d ON
我的資料庫(asm儲存)是11.1升級 11.2的。今天在做延遲段建立時報一定要升級到11.2才能應用此功能。查看我的執行個體的compatible是 11.1.0.0.0,自然想到 alter systerm set compatible='11.2.0.0.0' scope=spfile,但報不能修改當前spfile,那就修改pfile吧。SQL> create pfile='/tmp/pfile' from memory;然後修改了/tmp/pfile的compatible='11.