
SimpleDateFormat sf=new SimpleDateFormat("yyyy年MM月dd日hh时mm分ss秒");
oracle中要存入年月日亩毕 时分秒,首先要把oracle中这列余隐设置为timestamp 类型,然后java代码这么写:
import java.util.Date;
import java.sql.Timestamp;
Date time=new Date();
Timestamp timestamp=new Timestamp(time.getTime());
然后用插入语句把这个插进去就好了。竖耐厅
java里应该映射成TIMESTAMP
我是来做任务的