首页 > 数据库技术 > 详细

Oracle insert update 时间处理

时间:2016-04-13 11:22:21      阅读:169      评论:0      收藏:0      [点我收藏+]
24小时表示方法:to_date(’2004-06-30 23:59:59’,’yyyy-mm-dd hh24:mi:ss’)

12小时表示方法:to_date(’2004-06-30 23:59:59’,’yyyy-mm-dd hh:mi:ss’)

 

 

insert into settle_white values(‘15‘,‘S7551581‘,to_date(‘2016-04-12 20:20:59‘,‘yyyy-mm-dd hh24:mi:ss‘),

to_date(‘2016-04-12 20:20:59‘,‘yyyy-mm-dd hh24:mi:ss‘),‘0‘,‘1‘,sysdate,sysdate,‘aaa‘);

 

 

 

update settle_white t SET t.start_tm = to_date(‘2016-04-12 20:50:59‘,‘yyyy-mm-dd hh24:mi:ss‘),

t.end_tm = to_date(‘2016-04-12 20:50:59‘,‘yyyy-mm-dd hh24:mi:ss‘)  where t.white_id = ‘FC7551581‘;

 

 
-- 查询当前时间
 select to_char(sysdate,‘yyyy-MM-dd HH24:mi:ss‘) from dual;

 

Oracle insert update 时间处理

原文:http://www.cnblogs.com/testway/p/5386049.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!