Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Insert a date of type timestamp into oracle.

 
pavani potnuru
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 338
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic