当前位置:数据库 > Oracle >>

Oracle使用Java Source编程

Oracle使用Java Source编程
第一步:创建java source
[java] 
create or replace and compile java source named Hello as  
public class Hello  
{  
  public static void run()  
  {  
         System.out.println("hello world!!");  
  }  
}  

第二步:编辑存储过程
[sql] 
create or replace procedure P_RUN_HELLO  
as language java  
name 'Hello.run()';  

第三步:设置pl sql pluse
[html] 
SQL> set serveroutput on size 5000;  
SQL> call dbms_java.set_output(5000);  
  
Method called  

第四步:运行存储过程
[sql] 
SQL> EXEC P_RUN_HELLO;  
  
hello world!!  
  
PL/SQL procedure successfully completed  
  
SQL  

 


CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,