控制台輸出顯示了員工
Email address is: NKOCHHAR
結果集與 REF CURSOR
可使用 REF CURSOR 數據類型來處理 Oracle 結果集
包
PL/SQL 和 T
· 規范
· 正文
每個存儲過程或函數的參數都出現在括號內
· IN
· OUT
· INOUT
每個參數也都被標記以指示數據類型
以下包規范定義了四個過程
CREATE OR new PACKAGE CRUD_LOCATIONS AS
TYPE T_CURSOR IS REF CURSOR;
PROCEDURE GetLocations (cur_Locations OUT T_CURSOR);
PROCEDURE UpdateLocations (p_location_id IN NUMBER
p_street_address IN VARCHAR
p_postal_code IN VARCHAR
p_city IN VARCHAR
p_state_province IN VARCHAR
p_country_id IN CHAR);
PROCEDURE DeleteLocations (p_location_id IN NUMBER);
PROCEDURE InsertLocations (p_location_id OUT NUMBER
p_street_address IN VARCHAR
p_postal_code IN VARCHAR
p_city IN VARCHAR
p_state_province IN VARCHAR
p_country_id IN CHAR);
END CRUD_LOCATIONS;
[
From:http://tw.wingwit.com/Article/program/net/201311/15008.html