Home > Database > Mysql Tutorial > body text

Oracle函数使用Java类的方法

WBOY
Release: 2016-06-07 17:07:31
Original
1229 people have browsed it

对于Oracle来说,由于内置了Java的JVM,因此可以使用Java类的函数。

对于Oracle来说,由于内置了Java的JVM,因此可以使用Java类的函数。

具体使用方法

使用pl/sql developer:

(1)进入pl/sql developer,选择java sources:

新建一个

输入以下代码:(import 可以不要,,这里为了指出可以import包,故意加上的)

单击编译.

(2)在fuction内新建function:

create or replace function getTestStr return varchar2
as language java name 'Test.getTestStr() return java.lang.String'
;

然后编译。

(3)新建一个查询窗口.

select getTestStr() from dual;

输出结果:hello,world!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!