oracle 插入timestamp
生活随笔
收集整理的這篇文章主要介紹了
oracle 插入timestamp
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
示例:
insert into tpurview(IPURVIEWID,CPURVIEWNAME,COPERATENAME,IPARENTID,DADDTIME,DEDITTIME,CADDUSER,SLOCK) values(3501,'結(jié)算設(shè)置',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);結(jié)果:
?
附:
Oracle中向Timestamp字段插入值得問題。
2013-09-16 13:53匿名?|?瀏覽 7290 次 Oracle 表中有兩種類型的timestamp字段,分別為timestamp(3)和timestamp(6),如果我用下面這個(gè)函數(shù)生成timestamp值的話,生成的timestamp是哪種類型的呢?3還是6?生成3和6的to_timestamp函數(shù)調(diào)用應(yīng)該怎么寫?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'));
下面是結(jié)果
2013-9-16 17:03:00.300 2013-9-16 17:03:00.299990
timestamp(3)字段會將數(shù)據(jù)進(jìn)行四舍五入
?
轉(zhuǎn)載于:https://www.cnblogs.com/wql025/p/5095690.html
總結(jié)
以上是生活随笔為你收集整理的oracle 插入timestamp的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 你的性格,每小时都在发生变化
- 下一篇: python 代码片段6