Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL server: can't save/change table design

Tags:

sql

sql-server

I'm trying to make changes to an existing table and am getting this error when i try to save :

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.

I only have one data entry in the database - would deleting this solve the problem or do i have to re-create the tables as the error suggests? (This is on SQL-Server 2008 R2)

like image 332
jn025 Avatar asked Jan 07 '14 04:01

jn025


People also ask

How do I save a design change in a table in SQL?

Open SQL Server Management Studio. On the Tools menu, click Options. In the navigation pane of the Options window, click Designers. Select or clear the Prevent saving changes that require the table re-creation check box, and then click OK.

How do you enable the option Prevent saving changes?

To change this option, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.

How do I save an edit in SQL?

From the SQL Editor window, select Save from the File menu.


2 Answers

The following actions might require a table to be re-created:

  1. Adding a new column to the middle of the table
  2. Dropping a column
  3. Changing column nullability
  4. Changing the order of the columns
  5. Changing the data type of a column

To change this option, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.

refer

like image 94
Nagaraj S Avatar answered Sep 21 '22 14:09

Nagaraj S


you need to change settings to save the changes

  1. Open SQL Server Management Studio (SSMS).
  2. On the Tools menu, click Options.
  3. In the navigation pane of the Options window, click Designers.
  4. Select or clear the Prevent saving changes that require the table re-creation check box, and then click OK.

enter image description here

like image 36
Ali Adravi Avatar answered Sep 18 '22 14:09

Ali Adravi