码迷,mamicode.com
首页 > 数据库 > 详细

Oracle insert update 时间处理

时间:2016-04-13 11:24:59      阅读:175      评论: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)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!