Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / January 2005

Tip: Looking for answers? Try searching our database.

Oracle timestamp

Thread view: 
worzel - 03 Jan 2005 08:18 GMT
In Oracle, what is the best way to do an auto generated timestamp? I dont
want to do it this in java application code.
TIA
EricF - 04 Jan 2005 05:18 GMT
>In Oracle, what is the best way to do an auto generated timestamp? I dont
>want to do it this in java application code.
>TIA

I'm not usually fond of database triggers but for generating a timestamp
automatically, that's the best way to go.

Eric
worzel - 04 Jan 2005 05:40 GMT
seriously? The supposedly biggest and best database on the planet, and you
cant do a timestamp without resorting to a database specific trigger!

Somebody just pointed me to an oracle' currentTimestamp()' function that I
may be able to use as the default for a column - here's hoping. (Not even
sure if you can use a function as a default column value - soon find out I
guess)

>>In Oracle, what is the best way to do an auto generated timestamp? I dont
>>want to do it this in java application code.
[quoted text clipped - 4 lines]
>
> Eric
Tobias Besch - 04 Jan 2005 07:38 GMT
> In Oracle, what is the best way to do an auto generated timestamp? I

How about that:

Create table mytable (
    -- ... other columns...
    mycolumn Timestamp(9) Default SYSTIMESTAMP NOT NULL )


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.