Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Sequence or timestamp or ?

Re: Sequence or timestamp or ?

From: Anders Monrad <m_o_n_z_at_usa.net>
Date: Thu, 17 Jun 1999 08:53:19 +0200
Message-ID: <37689B5F.17657F7@usa.net>


Thank you very much..

/Anders

rkajda wrote:

> Hi
> You can't use sequence in default column clause but you can create
> trigger which fill column.
> for example
>
> create or replace trigger trg_bi_on_table_name
> before insert
> on table_name
> for each row
> begin
> select seq_t.nextval into :new.id from dual;
> end;
>
> Anders Monrad wrote:
>
> > Hi ..
> >
> > I need to make a table, with some kind of timestamp or system generated
> > key. How would you do that in Oracle ? DB2 has mikrosecs in its
> > timestamp, making it usefull, nut Oracle only has secs (WHY ??) so I
> > cant use a DATE.
> >
> > I tried a sequence, but it is not valid as a default colunm clause in
> > "create table".
> >
> > Can anybody tell me how something like this is done in Oracle (timestamp
> > controlled by the system - keys generated by the system) ?
> >
> > Thank you ..
> >
> > Anders Monrad
Received on Thu Jun 17 1999 - 01:53:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US