TimeToCodeTheRoad
TimeToCodeTheRoad

Reputation: 7312

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

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 need it urgently for a project!

Upvotes: 0

Views: 2875

Answers (2)

user330315
user330315

Reputation:

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

Upvotes: 2

cagcowboy
cagcowboy

Reputation: 30848

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

Upvotes: 0

Related Questions