• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Insert a date of type timestamp into oracle.

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....
 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic