drop table test;select count(*) from test;--建立測試表create table test(id number(9),nick varchar2(30));--插入測試資料begin for i in 1..100000 loop insert into test(id) values(i); end loop; commit;end;select * from test;--更新nick欄位,使資料發生嚴重傾斜update
第八章: managing password security and resources 1.controlling account lock and password sql> alter user juncky identified by oracle account unlock; 2.user_provided password function sql> function_name(userid in
/**********************************************************************查詢Drop操作刪除的對象select * from recyclebin ;單個對象(表、索引或是通過drop操作刪除的其它對象)恢複flashback table(被刪除的物件類型) 被刪除的對象名稱 to before drop**************************************************************
http://lwl0606.cmszs.com/archives/oracle-split-string-function.htmlCREATE OR REPLACE TYPE Varchar2Varray IS VARRAY(100) of VARCHAR2(40);/CREATE OR REPLACE FUNCTION sf_split_string (string VARCHAR2, substring VARCHAR2) RETURN Varchar2Varray IS len
資料庫中經常會有會某列進行排名,分組排名,求名次的需求,以前用的比較笨的方法 先order by 某列,然後用rownum今天學到兩個函數可以實現這樣的功能 rank,dense_rank具體文法如下:RANK ( ) OVER ( [query_partition_clause] order_by_clause )。 dense_rank與rank()用法相當,但是有一個區別:dence_rank在處理相同的等級時,等級的數值不會跳過。rank則跳過。 例如:表 A B C a
We don’t want to have every user install Oracle Data Access Components and drivers so we want to package it into our deployment.first dowload Oracle Data Access Components. The most current one as of 2/11/2011
第四章:索引 1.creating function-based indexes sql> create index summit.item_quantity on summit.item(quantity-quantity_shipped); 2.create a b-tree index sql> create [unique] index index_name on table_name(column,.. asc/desc)