Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Saving changes after table edit in SQL Server Management Studio

If I want to save any changes in a table, previously saved in SQL Server Management Studio (no data in table present) I get an error message:

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.

What can prevent the table to be easily edited? Or, is it the usual way for SQL Server Management Studio to require re-creating table for editing? What is it - this "option Prevent saving changes"?

like image 616
rem Avatar asked Dec 28 '09 11:12

rem


People also ask

How do I save an edited table in SQL?

Set the value of the Change Tracking item to True, and then click OK. On the Tools menu, click Options. In the Options dialog box, click Designers. Click to select the Prevent saving changes that require table re-creation check box, and then click OK.

How do I permanently save changes in SQL?

We can use COMMIT command to make the changes, made in a current transaction, permanently recorded in MySQL database. Suppose if we run some DML statements and it updates some data objects, then COMMIT command will record these updates permanently in the database.

How to save changes on table in SQL Server management studio?

On Microsoft SQL Server Management Studio, select Tools -> Options. On Options, expand Designers and select Table and Database Designers. Then, uncheck the Prevent saving changes that require the table re-creation check box and click OK. Now you can save changes on the table.

How do I change the prevent saving changes that require table re-creation?

To change the Prevent saving changes that require the table re-creation option, follow these steps: 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 to disable re-creating table for editing in SQL Server management studio?

Or, is it the usual way for SQL Server Management Studio to require re-creating table for editing? What is it - this "option Prevent saving changes"? Show activity on this post. Go into Tools -> Options -> Designers-> Uncheck "Prevent saving changes that require table re-creation". Voila.

Why can't I Save changes that require table re-creation in SSMS?

This is because, by default, SSMS prevents saving changes that require table re-creation. You can un-select this setting in the options screen. Go to menu Tools >> Options >> Designers and un-select the option Prevent saving changes that require table re-creation and press OK to save the settings.


2 Answers

Go into Tools -> Options -> Designers-> Uncheck "Prevent saving changes that require table re-creation". Voila.

That happens because sometimes it is necessary to drop and recreate a table in order to change something. This can take a while, since all data must be copied to a temp table and then re-inserted in the new table. Since SQL Server by default doesn't trust you, you need to say "OK, I know what I'm doing, now let me do my work."

like image 107
Pedro Avatar answered Sep 27 '22 15:09

Pedro


Tools | Options | Designers | Table and Database Designers

Uncheck the option "Prevent saving changes that require table re-creation".

like image 36
Prasanna Avatar answered Sep 27 '22 15:09

Prasanna