开发者

Database: Can java.sql.Timestamp be stored in a oracle database?

开发者 https://www.devze.com 2023-03-17 14:17 出处:网络
I wanted to know if java.sql.Timestamp can be stored in a oracle database. In teh oracle database the column type is TIMESTAMP? Sorry, i can not try it out myself as I dont have a oracle database, and

I wanted to know if java.sql.Timestamp can be stored in a oracle database. In teh oracle database the column type is TIMESTAMP? Sorry, i can not try it out myself as I dont have a oracle database, and i 开发者_Python百科need it urgently for a project!


In addition to cagcowboy's answer: you can even store a java.sql.Timestamp into an Oracle DATE column (as Oracle's DATE includes a time part)

Btw: details about the Oracle data types can be found in the manual, you don't need a running Oracle for that:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#sthref116


We use an Oracle TIMESTAMP(6) to map to a java.sql.Timestamp

0

精彩评论

暂无评论...
验证码 换一张
取 消