oracle INDEX BY Pl/sql陣列
--INDEX BY Pl/sql陣列
SET SERVEROUTPUT ON
DECLARE
TYPE NumberTab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
v_Numbers NumberTab;
BEGIN
FOR v_Count in 1..10 LOOP
v_Numbers(v_Count) := v_Count * 10;
END LOOP;
DBMS_OUTPUT.put_line('Table elements: ');
FOR v_Count IN 1..10 LOOP
DBMS_OUTPUT.put_line(' v_Numbers('|| v_Count||'): '||v_Numbers(v_Count));
END LOOP;
BEGIN
DBMS_OUTPUT.put_line('v_Numbers(11): '|| v_Numbers(11));
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.put_line('No data found reading v_Numbers(11)!');
END;
END;
SET SERVEROUTPUT ON
declare
type T_customerTab is table of t_customer%rowtype index by binary_integer;
t_customers T_customerTab;
begin
select * into t_customers(1) from t_customer where rownum = 1;
DBMS_OUTPUT.put_line( 'customer_name: '||t_customers(1).customer_id || ' customer_name: '||t_customers(1).customer_name);
end;
COME FROM:http://www.blogjava.net/fine/archive/2007/03/12/103358.html
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-687632/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- pl/sql陣列SQL陣列
- 從PL/SQL儲存函式返回陣列SQL儲存函式陣列
- 記錄Record、PL/SQL表和二維陣列SQL陣列
- Oracle PL/SQLOracleSQL
- PLSQL Language Referenc-PL/SQL集合和記錄-關聯陣列-宣告關聯陣列常量SQL陣列
- Oracle PL/SQL INDICESOracleSQL
- oracle PL/SQL示例OracleSQL
- PLSQL Language Referenc-PL/SQL集合和記錄-關聯陣列SQL陣列
- PLSQL Language Referenc-PL/SQL集合和記錄-可變陣列-正確地使用可變陣列SQL陣列
- PLSQL Language Referenc-PL/SQL集合和記錄-關聯陣列-正確地使用關聯陣列SQL陣列
- oracle pl/sql programmingOracleSQL
- javascript的boolean及陣列的indexJavaScriptBoolean陣列Index
- Oracle PL/SQL編寫PL/SQL程式碼的注意事項OracleSQL
- ORACLE之常用FAQ:SQL&PL/SQLOracleSQL
- Oracle PL/SQL塊簡介OracleSQL
- Oracle PL/SQL中EXCEPTION用法OracleSQLException
- Oracle PL/SQL 之 函式OracleSQL函式
- PL/SQL Developer 連線 OracleSQLDeveloperOracle
- 【PL/SQL】oracle建立dblinkSQLOracle
- Oracle PL/SQL之GROUP BY CUBEOracleSQL
- Oracle PL/SQL迴圈示例OracleSQL
- 【Oracle】--PL/SQL匯入Oracle sql指令碼"傻瓜教程"OracleSQL指令碼
- oracle 點陣圖索引(bitmap index)Oracle索引Index
- Oracle 的PL/SQL語言使用OracleSQL
- Oracle PL/SQL之 Package介紹OracleSQLPackage
- oracle PL/SQL中的過載OracleSQL
- Oracle PL/SQL語言基礎OracleSQL
- 【Oracle】Windows安裝pl/sql developerOracleWindowsSQLDeveloper
- oracle dbms_profiles分析pl/sqlOracleSQL
- Oracle 11g系列:SQL Plus與PL/SQLOracleSQL
- Oracle PL/SQL 優化與調整 – PL/SQL Native Compilation 說明OracleSQL優化
- oracle10g r2_sql tuning_bitmap index點陣圖索引_index效能小測試OracleSQLIndex索引
- 使用profiler測試Oracle PL/SQL效能OracleSQL
- Oracle Pl/SQL 之 儲存過程OracleSQL儲存過程
- Oracle之PL/SQL基礎學習OracleSQL
- Oracle PL/SQL語言基礎(轉)OracleSQL
- 【SQL/PLUS】Oracle PL/SQL程式設計用set serveroutput onSQLOracle程式設計Server
- PL/SQLSQL