第一步:創建java source
create or replace and compile java source named Hello
as
public class Hello{
public static void run(){
System.out.println("slc testing...");
-
}
}
第二步:編輯存儲過程
create or replace procedure run_hello
as language java
name 'Hello.run()';
第三步:設置pl sql pluse
PL/SQL procedure successfully completed
SQL> set serveroutput on size 5000;
SQL> call dbms_java.set_output(5000);
Method called
第四步:運行存儲過程
SQL> exec run_hello;
slc testing...
PL/SQL procedure successfully completed
SQL> 本文出自:億恩科技【www.laynepeng.cn】
服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]
|