Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Trouble creating new field on table

Posted on 2013-06-11
4
Medium Priority
?
213 Views
Last Modified: 2013-06-14
I'm trying to insert a new field into a table and I'm getting the following error:

Saving changes is not permitted.  The changes you have made require the following tables to be dropped and re-created.  You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.
0
Comment
Question by:hrolsons
[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
  • 3
4 Comments
 
LVL 11

Expert Comment

by:Louis01
ID: 39239530
In SQL Server Management Studio, go to Tools, Options, [Designers, Table and Database designers]. Remove the checkbox against [Prevent saving changes that require table re-creation]

Keep in mind that you can loose all data in the table. In such cases, it is frequently a good idea to rename the table, recreate it and import the data.
0
 

Author Comment

by:hrolsons
ID: 39239548
I would rather do it the safe way.  I can handle renaming.  Recreate, would that be Script-Create To and add my new field into the SQL.  And then I'm not sure how to import.
0
 
LVL 11

Accepted Solution

by:
Louis01 earned 2000 total points
ID: 39239582
You could right click on the table name in Object Explorer and generate a new create script from there to alter.

To import, see INSERT INTO SELECT FROM

If your simply want to add a new column to a table, consider that you are probably specifying it as NOT NULL, thus the recreating of the table. Maybe you can set it as NULLABLE initially, set some value and then make it NOT NULLABLE.

For help on Alter Table Scripts, see ALTER TABLE
0
 
LVL 11

Expert Comment

by:Louis01
ID: 39246714
hrolsons

Did you manage?

Louis
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

721 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