sql index

Posted on 2012-08-21
Last Modified: 2012-08-21
I have added a table to my sql. I created an "index" and make it a primary key. But for some reason it's not adding the next records automatically. Did I not create the index propertly?
Question by:Starquest321
    LVL 15

    Assisted Solution

    You mean Auto-Numbering? If so you must enable the Identity property for the new column. Indexes are not meant for this purpose, they are used for improving read performance of the queries.

    Author Comment

    ok perfect - where is that? How can I do it? I am using sql 2005
    LVL 10

    Accepted Solution

    In the design of the table, check the fields extended properties for an 'Identity' property.
    LVL 9

    Assisted Solution

    other way is..

    CREATE TABLE dbo.tblFoo  
    baz INT

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now