Solved

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

Posted on 2013-12-28
1
1,406 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
1 Comment
 
LVL 25

Accepted Solution

by:
jogos earned 500 total points
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

772 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

11 Experts available now in Live!

Get 1:1 Help Now