您好,登錄后才能下訂單哦!
1. 創建Java Stored Procedure
create or replace and compile java source named "TestHello" as public class TestHello{ public static void test(){ System.out.println("Hello"); } }
2.創建JSP調用存過或方法(本例為在包創建的存過)
create or replace package pkg_test is procedure do_Test; end pkg_test; / create or replace package body pkg_test is procedure do_Test as language java name 'TestHello.test()'; begin null; end pkg_test; /
3.在命令窗口調用,通過如下命令使System.out重定向到當前窗口
SQL> set serveroutput on SQL> call dbms_java.set_output(5000); Method called SQL> exec pkg_test.do_Test; Hello PL/SQL procedure successfully completed
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。