SQL Server 2000 ID Number

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
__________________________________________________________________
 
A

Andrew J. Kelly

You use the IDENTITY function. You can find more info in BooksOnLine on
how to use it.
 
W

William \(Bill\) Vaughn

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.
__________________________________
 
A

Andrew J. Kelly

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.
 
K

Kalen Delaney

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top