小弟现有一段存储过程代码(Sybase),作为String传过来,例如:
if exists (select colName from custSchema..tableName where colName = 'tempTable' )
drop table #tempTable
go
declare @age
select @age = 20
select * from custSchema..personTable where age = @age
select * from custSchema2..regTable where age = @age现在的需求是想用java直接解释这段存储过程代码,并获得返回值,有什么办法么?
谢谢各位啦
if exists (select colName from custSchema..tableName where colName = 'tempTable' )
drop table #tempTable
go
declare @age
select @age = 20
select * from custSchema..personTable where age = @age
select * from custSchema2..regTable where age = @age现在的需求是想用java直接解释这段存储过程代码,并获得返回值,有什么办法么?
谢谢各位啦
你这个问题,网上很多,随便百度就有!
输入关键字 java 存储过程
CallableStatement toesUp = null;
conn = common.ConnectDataBase.getConnection();
toesUp = conn.prepareCall("{call abc('"+ planlotid+ "') }");
toesUp.execute();
toesUp.close();
对这个需求比较好奇啊,一般做法都是数据库中建立好存储过程之后,java去调用他,新建也要通过java,这个是的确没有接触过,等待高手解答