 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
worzel Guest
|
Posted: Mon Jan 03, 2005 8:18 am Post subject: Oracle timestamp |
|
|
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
|
Posted: Tue Jan 04, 2005 5:18 am Post subject: Re: Oracle timestamp |
|
|
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
|
Posted: Tue Jan 04, 2005 5:40 am Post subject: Re: Oracle timestamp |
|
|
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
|
Posted: Tue Jan 04, 2005 7:38 am Post subject: Re: Oracle timestamp |
|
|
"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 |
|
 |
|
|
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
|
|