|
Posted by --CELKO-- on 10/02/46 11:50
>> I am finding unexpected results when inserted into a newly created table that has a field [sic] of datatype int identity (1,1). <<
Let's get back to the basics of an RDBMS. Rows are not records; fields
are not columns; tables are not files; there is no sequential access or
ordering in an RDBMS, so "first", "next" and "last" are totally
meaningless. If you want an ordering, then you need to have a column
that defines that ordering. You must use an ORDER BY clause on a
cursor or in an OVER() clause.
Next, by definition -- repeat BY DEFINITION !!! -- IDENTITY is not a
key.
>> Have I been wrong in assuming that it should reflect the order from the sort? <<
Your assumptions are MUCH worse than that! You have missed ALL of the
foundations of RDBMS. As they say in Zen, you must empty your cup to
drink new tea. Please get a good book on RDBMS, take some time and get
it right before you kill someone.
Navigation:
[Reply to this message]
|