|
Posted by Erland Sommarskog on 08/22/05 01:13
Hugo Kornelis (hugo@pe_NO_rFact.in_SPAM_fo) writes:
> Your mention of preserving order when rows are deleted makes me think
> that you want to use IDENTITY to get a ranking. In that case: don't. The
> only thing MS guarantees about IDENITY is that it will be a unique value
Eh, André says he does not want to use IDENTITY, so you tell him not to
use it?
Anyway, if you say:
INSERT tbl (...)
SELECT ...
ORDER BY ...
and tbl has an IDENTITY column, the message I have, is indeed that there
is a guarantee that the IDENTITY values will reflect the ORDER BY clause.
However, this does not apply to SELECT INTO.
In any case, it is obvious from Andre's description of his business problem
that he should stay away from IDENTITY.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|