You are here: Re: Getting list of recently added IDENTITY items « MsSQL Server « IT news, forums, messages
Re: Getting list of recently added IDENTITY items

Posted by David Portas on 10/01/12 11:42

pb648174 wrote:
> Bob: Hey what project are you working on?
> John: The really, really, long description of a project that would
> otherwise be simply reference by a number v2.1.3.4.5.1.8
> Bob: What?
> John: Project 12
> Bob: Oh.

You have answered your own question. In reality the users need some way
of identifying the project that is a lot more practical than a 500
character description. So your stated business requirement ("only a
description") is incomplete. For sure an IDENTITY column isn't going to
help because you can't set its value, you can't update it, you can't
verify it, you can't perform set-based inserts or merge data sets with
it (e.g. see your original question).

One of the key benefits of an IDENTITY column is that it has no
external meaning whatsoever. Don't compromise that. If you need a
project number use a numeric / integer column by all means, but not
IDENTITY.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация