Solved

Set an auto-generated unique identifier column in SQL server table.

Posted on 2013-12-28
1
1,482 Views
Last Modified: 2013-12-28
Having spent years with MS Access I'm now adjusting to SQL Server.

In table design view, how do I create the equivalent of Access's autonumber field?
0
Comment
Question by:TimHudspith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
jogos earned 500 total points
ID: 39743343
You set the identity-property to a int-column, more details
http://msdn.microsoft.com/en-us/library/ms186775(v=sql.105).aspx

In design view that is in the column properties. Look for identity, say it is an identity-column  set startingpoint (seed) of your numbering and the increment
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WSUS Console loosed connectivity to the database. 13 43
how to make geography query faster?  SQL 7 45
sql query 5 44
Neglected Questions 3 12
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.

726 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