0

How do I modify a table with SQL Server 2012 in design view? I am not able to alter the table in design view, when I'm done with my changes it gives me the error on the image:

enter image description here

wpercy
  • 9,636
  • 4
  • 33
  • 45
aman khan
  • 83
  • 8

3 Answers3

1

The message error is self explanatory :)

  • Check the Allow nulls checkbox.
  • Fill this column with data
  • then edit the table again and uncheck the allow nulls checkbox
Hassan
  • 1,413
  • 1
  • 10
  • 12
0

You try to add a new column that must have a value by your definition. But you are not giving a value. Ask yourself: What should the existing records have for that column?

If you can think of a value then add this as default. If not then allow nulls for that column.

juergen d
  • 201,996
  • 37
  • 293
  • 362
-1

(Solve your problem) To change the Prevent saving changes that require the table re-creation option, follow these steps: 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.

Note: If you disable this option, you are not warned when you save the table that the changes that you made have changed the metadata structure of the table. In this case, data loss may occur when you save the table.

MORE INFORMATION visit this link:

https://support.microsoft.com/en-us/kb/956176