AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Oracle timestamp

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
worzel
Guest





PostPosted: Mon Jan 03, 2005 8:18 am    Post subject: Oracle timestamp Reply with quote



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


Back to top
EricF
Guest





PostPosted: Tue Jan 04, 2005 5:18 am    Post subject: Re: Oracle timestamp Reply with quote



In article <41d8ffba$0$8133$5a62ac22 (AT) per-qv1-newsreader-01 (DOT) iinet.net.au>, "worzel" <asda (AT) sdarta (DOT) com> wrote:
Quote:
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

Back to top
worzel
Guest





PostPosted: Tue Jan 04, 2005 5:40 am    Post subject: Re: Oracle timestamp Reply with quote



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)


"EricF" <efriedNoSpam (AT) yahoo (DOT) com> wrote

Quote:
In article <41d8ffba$0$8133$5a62ac22 (AT) per-qv1-newsreader-01 (DOT) iinet.net.au>,
"worzel" <asda (AT) sdarta (DOT) com> wrote:
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



Back to top
Tobias Besch
Guest





PostPosted: Tue Jan 04, 2005 7:38 am    Post subject: Re: Oracle timestamp Reply with quote

"worzel" <asda (AT) sdarta (DOT) com> wrote in
news:41d8ffba$0$8133$5a62ac22 (AT) per-qv1-newsreader-01 (DOT) iinet.net.au:
Quote:
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 )

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.