一:无返回值的存储过程调用存储过程:CREATE OR REPLACE PROCEDURE PRO_1(PARA1 IN VARCHAR2,PARA2 IN VARCHAR2) AS BEGIN INSERT INTO DBO.EMP (ID,NAME) VALUES (PARA1, PARA2);END PRO_1;Java代码:package com.icesoft.service;import java.sql.*;import java.sql.ResultSet;public class CallProcedureTest1 {public CallProcedureTest1() Read More
posted @ 2011-08-09 10:23 齐心 Views(7754) Comments(1) Diggs(1) Edit
CREATE OR REPLACE PACKAGE typesAS TYPE ref_cursor IS REF CURSOR;END;/CREATE TABLE STOCK_PRICES( RIC VARCHAR(6) PRIMARY KEY, PRICE NUMBER(7,2), UPDATED DATE );/CREATE OR REPLACE FUNCTION sp_get_stocks(v_price IN NUMBER) RETURN types.ref_cursorAS stock_cursor types.ref_cursor;BEGIN OPEN stock_cursor F Read More
posted @ 2011-08-09 10:03 齐心 Views(660) Comments(0) Diggs(0) Edit