oracle在线文档点击打开链接
http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/fundamentals.htm#LNPLS002
- 存储过程,游标使用动态sql
- declare
- v_1 varchar2(8);
- v_2 varchar2(10);
- str varchar2(50);
- begin
- v_1:='macower’;
- v_2:='深圳;
- str := 'INSERT INTO test (name ,address) VALUES (:1, :2)';
- EXECUTE IMMEDIATE str USING v_1, v_2;
- commit;
- end;
- CREATE OR REPLACE PACKAGE BODY pkg_test
AS
PROCEDURE get ( p_rc OUT myrctype)
IS
sqlstr VARCHAR2 (500);
BEGIN
sqlstr :='select * from a_table';
OPEN p_rc FOR sqlstr;
END get;
END pkg_test;
存储过程觉问题
- 1.不能debug,是因为双机采用了负载均衡,在tnsnames中只留下一个address_list
-