Function定义
来源:互联网 发布:五彩十二花神杯淘宝 编辑:程序博客网 时间:2024/04/29 23:57
1.Function声明:
create or replace function getValueFunc(num NVARCHAR2)
return NVARCHAR2 is
fnameRet NVARCHAR2(100);
begin
select fname into fnameRet from t_afl_bd_custrptitem where fnumber = num;
return fnameRet;
end;
2.测试:
select getValueFunc('0500124') from dual
3.JDBC调用:
Connection con = null;
CallableStatement cs = null;
try {
con = ConnectionFacatory.getCon();
cs = con.prepareCall("{? = call getValueFunc(?)}");
cs.registerOutParameter(1, Types.VARCHAR);
cs.setString(2, "0500124");
cs.execute();
String retValue = cs.getString(1);
System.out.println(retValue);
} catch (SQLException e) {
throw new BOSException(e);
} finally {
try {
cs.close();
con.close();
} catch (SQLException e) {
throw new BOSException(e);
}
}
2009-10-20
- Function定义
- function定义
- Python function 函数定义
- ~function(){}()函数定义
- nodejs function定义
- 定义函数一定要用function
- Javascript定义function的区别
- Function对象 , 用来定义方法
- 042.Function 函数的定义
- 042.Function 函数的定义
- Javascript 两种 function 定义的区别
- smartforms和function中接口定义
- Javascript 两种定义Function的方法
- c++ operator定义为friend function
- mysql 定义方法(function) 存储过程(procedure)
- 尽量定义class形式的Function Object
- js function定义函数使用心得
- js function定义函数使用心得
- 软件工程师的十个“不职业”行为!(程序员杂志)
- (转).NET+实体类反射得到XML(序列化为XML)
- java.util.Random学习
- hibernate刷新数据时的缓存问题
- Lua 与 C++混合编程
- Function定义
- Mercury公司相关产品的"The RPC server is unavailable"完整解决方案
- 嵌入式QT平台安装过程记录
- 本地计算机上无法启动OracleOraDb10g_Home1TNSListener服务 错误3: 系统找不到指定的路径
- 一个月薪三万中专生给大学生的忠告
- callback function
- Oracle 10G数据库中"ORA-12541: TNS:no listener"报错解决办法
- Moto手机屏幕参数2
- JavaScript讲义记录6-7