本文主要是介绍PL/SQL程序中调用Java代码,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、新建java source窗口
2、右键编辑 新建一个java soure 输入 name class
3、create or replace and compile java source named fieldencrypt as 新建完之后自带的 不可删除
直接粘贴代码就行
4、新建一个sql windows窗口 创建函数
create or replace procedure zysj_field_encrypt
as language java
name 'Hello.run()';
5、执行完后直接在sql中使用即可
UPDATE cm_cust_info
SET cust_name = zysj_field_encrypt(cust_name, to_char(cust_id)),cust_Cert_code = zysj_field_encrypt(cust_Cert_code, to_char(cust_id)),cust_Cert_Addr = zysj_field_encrypt(cust_Cert_Addr, to_char(cust_id)),remark = remark || 'info'
WHERE cust_id IN (SELECT cust_idFROM (SELECT cust_idFROM cm_cust_infoWHERE remark NOT LIKE '%info%' AND ROWNUM <= 50000)
);
这篇关于PL/SQL程序中调用Java代码的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!