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

Home -> Community -> Usenet -> c.d.o.server -> Re: identity in MSSQL7, is Oracle has this concept?

Re: identity in MSSQL7, is Oracle has this concept?

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Fri, 12 Jan 2001 04:02:48 GMT
Message-ID: <Ilv76.254348$U46.8083989@news1.sttls1.wa.home.com>

Use sequences. You will have to write a trigger to retrieve the next sequence for an insert where you want that functionality. Sequences are numbers.
Jim

"Lee" <hengchee.lee_at_aretae.com> wrote in message news:93lt99$i6v$1_at_coco.singnet.com.sg...
> Hi,
> I'm trying to port a program written to access MSSQL7 database to work
 with
> Oracle8i.
> Now I have this question:
> In MSSQL 7, you can assign a column with int datatype a IDENTITY attribute
> when you create the table. The data value of this column will then be
> automatically inserted by the database server when new row is inserted in
> the table, user cannot modify the value in this column and the value in
 the
> column is guaranteed to be unique.
> In Oracle8i, it seems that there is no such keyword as IDENTITY but there
 is
> a datatype ROWID which seems to serve the same purpose. But when I try to
> retrieve the value of this ROWID column by using "select rowid from
> abctable", the value returned in this rowid column read
> AAAA5xAAJAAAAASAAA for first row and
> AAAA5xAAJAAAAASAAB for second row.
>
> Is there a way to convert this value to a human readable integer?
> Or is there other "CORRECT" way to mimic the IDENTITY function is MSSQL7?
>
>
>
>
>
> Thanks and best regards
> Lee
>
>
>
>
>
Received on Thu Jan 11 2001 - 22:02:48 CST

Original text of this message

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