oracle 插入timestamp
生活随笔
收集整理的这篇文章主要介绍了
oracle 插入timestamp
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
示例:
insert into tpurview(IPURVIEWID,CPURVIEWNAME,COPERATENAME,IPARENTID,DADDTIME,DEDITTIME,CADDUSER,SLOCK) values(3501,'结算设置',null,3500,to_timestamp('2012-07-24 12:26:23','yyyy-mm-dd hh24:mi:ss'),to_timestamp('2012-07-24 12:26:23','yyyy-mm-dd hh24:mi:ss'),'wang',0);结果:
附:
Oracle中向Timestamp字段插入值得问题。
2013-09-16 13:53匿名 | 浏览 7290 次 Oracle 表中有两种类型的timestamp字段,分别为timestamp(3)和timestamp(6),如果我用下面这个函数生成timestamp值的话,生成的timestamp是哪种类型的呢?3还是6?生成3和6的to_timestamp函数调用应该怎么写?to_timestamp('....', 'yyyy-mm-dd hh24:mi:ss:ff') 2013-09-16 17:24 提问者采纳 取决于你字段定义的是 timestamp(3)还是timestamp(6)
INSERT INTO TEST VALUES(to_timestamp('2013-9-16 17:03:00.29999', 'yyyy-mm-dd hh24:mi:ss:ff'),to_timestamp('2013-9-16 17:03:00.29999', 'yyyy-mm-dd hh24:mi:ss:ff'));
下面是结果
2013-9-16 17:03:00.300 2013-9-16 17:03:00.299990
timestamp(3)字段会将数据进行四舍五入
转载于:https://www.cnblogs.com/wql025/p/5095690.html
总结
以上是生活随笔为你收集整理的oracle 插入timestamp的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 你的性格,每小时都在发生变化
- 下一篇: node实现watcher的困境