一、helloWord
1 编写JAVA程序,也是在SQL/PLUS中写,并执行.
create or replace and compile java source named hello as
public class Hello {
static public String Message(String name) {
return " Hello, " + name;
}
}
/
2 发布JAVA程序
create or replace function hello (name VARCHAR2 ) return VARCHAR2
as language java name
' Hello.Message (java.lang.String) return java.lang.String ' ;
/
3 使用上面的JAVA程序
select hello( ' world! ' ) from dual;
HELLO( ' world! ' )
-- -------------
Hello world!
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/a9529lty/archive/2009/12/30/5108807.aspx