Thanks in advance.
Firinde,
I'm not exactly sure what Oracle "sequences" are, but it sounds
like it might be similar to SYBASE IDENTITY columns, defined in the
vendor documentation thusly:
"IDENTITY columns contain system-generated values that uniquely
identify each row within a table. They are used to store sequential
numbers...that are generated automatically..."
You can find the IDENTITY related SYBASE documentation on-line
at: http://sybooks.sybase.com/cgi-bin/nph-dynaweb/srv11009/sqlref/63195.
I hope this helps.
Michael.
--
Michael Shael O'Neill Selden, SA, DBA, JAPH, DAD
sel...@instinet.com
Remove "NOSPAM." From Address To Return Mail
PGP Public Key Available Upon Request
Without any details on how Oracle sequences work, it is difficult
to answer the question.
However
1) You can add an identity column to the table that increments
as rows are added. Deleted rows will cause gaps in the sequence,
but if you order by identity, the rows will be in insert order.
2) You can add a timestamp column to the table. The rows that have
most recently been inserted or updated will have the highest timestamp,
and you can order by timestamp.
3) You can select rows into a work table and add an identity column
to the worktable. Until the table is modified, the identity values
will form a gapless sequence.
--
---------------------------------------------------------------------
| Bret Halford Imagine my disappointment __|
| Sybase Technical Support in learning the true nature __|
| 6400 S. Fiddlers Green Circle of rec.humor.oracle... __|
| Englewood, CO 80111-4954 USA |
============================================================
Sure, it is called an identity col in a table, eg. -
create table a(col1 numeric(5,0) identity,
col2 char(1))
now do
insert into a values('a') etc
and col1 will be automatically generated.
regards
amit
--
_______________________________________________________________________________
Truth is self-evident; nonviolence is its maturest fruit, it is
contained in Truth, but is not self-evident. - Gandhi
My Home Page: http://www.geocities.com/ResearchTriangle/4960/
_______________________________________________________________________________
Firinde Teylouni wrote in article <3417A4...@elca-matrix.ch>...