java向oracle数据库中插入当前时间

public class Test{
public static void main (String args []){
java.util.Date a = new java.util.Date();
System.out.println(a);
java.sql.Date b = new java.sql.Date(a.getTime());
System.out.println(b);
java.sql.Time c = new java.sql.Time(a.getTime());
System.out.println(c);
java.sql.Timestamp d=new java.sql.Timestamp(a.getTime());

你可能感兴趣的:(Java,数据库)