首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

生手求教!

2013-01-23 
新手求教!!!!oracle数据库中的表fund的各数据类型 (时间数据类型是用date还是datetime?)create table fund

新手求教!!!!
oracle数据库中的表fund的各数据类型 (时间数据类型是用date还是datetime?)
create table fund(
 fund_no  int primary key,
 fund_name  varchar2(40) not null,
 fund_price number(6,3) not null,
 fund_desc  varchar2(100),
 fund_status char(1) not null,
 create_date date not null,
 oper_code char(4) not null,
 constraint FK_FUND_OPERATOR FOREIGN KEY (oper_code) references operator,
 constraint UK_FUND UNIQUE (fund_name)   
);
还有在jsp中的,sql插入语句应该如何写,
private static final String SQL_ADD =
 "insert into fund values(seq_fund.nextval,?,?,?,?,?[此处的时间应该如何写?],?)";

前提:在fund_input表单提交页面未传递fund_no与create_date参数,应该时间是要用什么函数来获取吧,求教!!!! oracle与jsp的问题求教!!!
[解决办法]
//将系统时间作为插入时间,需要转换
long nowtime=new Date().getTime();
java.sql.Date billDate=new java.sql.Date(nowtime);

热点排行