oracle中如何插入date型別的資料方法如下:
insert into tabname(datecol) value(sysdate) ; -- 用date值
insert into tabname(datecol) value(sysdate+1) ; -- 用date值
insert into tabname(datecol) value(to_date("2014-02-14","yyyy-mm-dd")) ; -- 用to_date
insert into tabname(datecol) value(to_date("2014-02-14 20:47:00","yyyy-mm-dd hh24:mi:ss")) ; -- 用to_date
insert into tabname(datecol) value(to_date("20140214","yyyymmdd")) ; -- 用to_date
insert into tabname(datecol) value(to_date("20140214204700","yyyymmddhh24miss")) ; -- 用to_date
oracle中如何插入date型別的資料方法如下:
insert into tabname(datecol) value(sysdate) ; -- 用date值
insert into tabname(datecol) value(sysdate+1) ; -- 用date值
insert into tabname(datecol) value(to_date("2014-02-14","yyyy-mm-dd")) ; -- 用to_date
insert into tabname(datecol) value(to_date("2014-02-14 20:47:00","yyyy-mm-dd hh24:mi:ss")) ; -- 用to_date
insert into tabname(datecol) value(to_date("20140214","yyyymmdd")) ; -- 用to_date
insert into tabname(datecol) value(to_date("20140214204700","yyyymmddhh24miss")) ; -- 用to_date