Topic: CallableStatement的输出参数

  Print this page

1.CallableStatement的输出参数 Copy to clipboard
Posted by: battlekiller
Posted on: 2004-11-20 19:06

声明CallableStatement cs的对象
然后在他的构造方法中 ("{call ?=pro(?,?,?)}")
ResultSet rs;

pro在SQL中的程序为
//存储过程
create proc pro
@ID CHAR(10),@AGE CHAR(10),@NAME CHAR(10),
@rs char(10) output
as
//插入一行资料
insert into student
values
(@ID,@NAME,@AGE)
@rs=1
我在JAVA中怎么让程序返回@rs到System.out.println();中


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923