SQL Server 2000 ID Number

  • Thread starter Thread starter VideoSmeden
  • Start date Start date
V

VideoSmeden

Hi
Please help me URGENT
How do i make an tableField with a
Auto-Incr, the same like in an access DB where it's
called AutoNumber

Thanx in advance
__________________________________________________________________ Flemming
Paulsen ICQ#: 270065050 Current ICQ status: + More ways to contact me
__________________________________________________________________
 
You use the IDENTITY function. You can find more info in BooksOnLine on
how to use it.
 
Ah, it's better to use the SCOPE_IDENTITY() function instead of the
@@IDENTITY global variable.

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
I believe he is referring to the IDENTITY datatype itself but I could be
wrong. If you only want to retrieve the value then use what Bill suggests.
 
Actually, in SQL Server IDENTITY is a property of a column. It is neither a
function, nor a datatype.
But, like Andrew said, you still need to get full details from Books Online.
Start in the CREATE TABLE section.

Also, please do not post more than one or two newsgroups. Any more is
overkill, plus some of the ones you listed are completely irrelevant.
 
Back
Top