摘要:
1.创建1 create or replace procedure getLog(record_ref out sys_refcursor,inputId in log201112.id%type)2 AS3 begin4 open record_ref for5 select * from log201112 where id=inputId;6 end getLog;7 /2.调用 1 String procedure="{call getLog(?,?)}"; 2 CallableStatement cstmt=conn.prepareCall(procedure); 阅读全文
摘要:
节选自:《Hibernate开发与实战》(刘伟、张利国,电子工业出版社,2009.9)有时候需要动态操作表的数据。如通过数据库记录日志信息时每个月产生一张日志表,结构都一样只是表名不同。表名取log200902等。可以利用SQLQuery对象的addEntity()动态关联持久化类和数据库表。1.oracle表1 create table log201112(2 id number(8) not null,3 content varchar2(1000),4 create_time varchar2(20) not null,5 primary key(id)6... 阅读全文