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 -> identity in MSSQL7, is Oracle has this concept?

identity in MSSQL7, is Oracle has this concept?

From: Lee <hengchee.lee_at_aretae.com>
Date: Fri, 12 Jan 2001 11:40:10 +0800
Message-ID: <93lt99$i6v$1@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 - 21:40:10 CST

Original text of this message

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