locked
creating a identify feild RRS feed

  • Question

  • I have this code and i am not sure how to put the identity feild into employee ID feild i need it to be the primary key and be an identity feild i think that is where it automatically creates numbers

    CREATE

     

    TABLE employees1 (

    EmployeeID

    int Primary Key,
    LastName nvarchar,
    FirstName nvarchar,
    Address nvarchar(50),
    City NVARCHAR(120),
    State NvarChar(40),
    TelephoneAreaCode NVarChar(50),
    TelephoneNumber nvarchar(20),
    HireDate date,
    Salary money,
    Gender nvarchar(32),
    Age int,
    JobTitle nvarchar);

    GO

    Sunday, January 31, 2010 5:25 PM

Answers

  • Change


     

    EmployeeID

    int Primary Key,



    to


    EmployeeID

    int identity Primary Key,

    • Marked as answer by porginski Sunday, January 31, 2010 5:29 PM
    Sunday, January 31, 2010 5:26 PM