Reply to Re: Obtaining count for identity

Your name:

Reply:


Posted by Hugo Kornelis on 06/16/05 00:19

On 15 Jun 2005 14:00:46 -0700, hartley_aaron@hotmail.com wrote:

>Is there a way to query a SQL server such that it will return the
>current counter value of a field that increments automatically (an
>identity field)? Using a MAX query might not necessarily give you the
>correct information because it is possible that the high value records
>were deleted. I checked the system tables and none of them appear to
>have what I need. I suppose it would be possible to maintain a table
>that lists all the incrementing columns, but ideally there would be a
>way already built into SQL Server.
>
>Thanks.

Hi hartley_aaron,

Look up IDENT_CURRENT in Books Online.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)

[Back to original 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

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