如何插入在Orcle数据库里的插入日期类型
1个回答
展开全部
1
2
3
4
5
6
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
2
3
4
5
6
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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询