Solved

How to set 'is identity' to yes for incrementing id when rows of data already exist

Posted on 2011-09-13
3
244 Views
Last Modified: 2012-05-12
I have a table I imported from Access to SQL Server, it didn't recognise that the column named ID was a primary key column, nor that it was an incrementing identity column.

How do I set 'is identity' to yes for incrementing id when rows of data already exist in the table? When I do this in the tables design using SQL Server Express 2008 r2 it says:
'Saving changes not permitted. The changes you have made require the following tables to be dropped and re-created'!! ...it's a lot of tables and a lot of data, so I need a way of doing this quickly and efficiently.

Please help!

Thanks Experts.

/ Tobzzz

0
Comment
Question by:tobzzz
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
Lee Savidge earned 500 total points
ID: 36528420
Tools -> Options -> Designers -> Table and Database designers -> untick Prevent Saving changes that require table re-creation.
0
 
LVL 11

Author Comment

by:tobzzz
ID: 36528789
Ah fantastic, thank you so much :-)
0
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 36528973
No probs. Its ticked by default in SQL 2008 and it's caught a lot of people by surprise including me :)

Lee
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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

12 Experts available now in Live!

Get 1:1 Help Now