none
autonumber in SQL Server Express

    Question

  •  

    Does anyone know how to add an autonumber field into a table? Is this the same as uniqueidentifier?? I have a table and I need to create a field to use as Primary Key. I would appreciate any help.

    -Brad B

    Tuesday, April 18, 2006 12:42 AM

Answers

  • identity is the autonumber keyword.

    create table tblWhatever

    (

        id int identity,

        name nvarchar(50) /* whatever */

    )

    Tuesday, April 18, 2006 1:19 AM

All replies