wood burning stoves 2.0*
The moose likes JDBC and the fly likes Insert a date of type timestamp into oracle. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Insert a date of type timestamp into oracle. " Watch "Insert a date of type timestamp into oracle. " New topic
Author

Insert a date of type timestamp into oracle.

pavani potnuru
Greenhorn

Joined: Nov 04, 2007
Posts: 11
I have to retrieve the records in a chronological order.So I need to insert the records using time stamp so that i can compare them and retrieve.
I need the syntax of the insert statement.Please help me out in this....
Paul Campbell
Ranch Hand

Joined: Oct 06, 2007
Posts: 338
insert into your_table(your_column) values (SYSTIMESTAMP);

Alternately you can use the to_date function to format a Date String of your own for inserting in the data base.. substitute it in place of systimestamp

insert into your_table(your_column) values (to_date(yourString, 'mm/dd/yyyy hh24:mi:ss'))
[ December 12, 2007: Message edited by: Paul Campbell ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Insert a date of type timestamp into oracle.
 
Similar Threads
ResultSet object
ResultSet object
Insert new records in database without deleting existing records
inserting image
How to get a complete string from actionmessage in action class