• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

Allow Nulls - Put a checkmakr in that field?

I have a MS SQL Server Management Studio.

I have a field name and I would like to change to allow nulls. how i'm able to put a checkmark into that fields allow nulls?

Column name    Data type       Allow nulls.
name                  char(10)           [     ]

Thank yous.
  • 2
1 Solution
koilaAuthor Commented:
This is because  "Prevent saving changes that require the table re-creation option" in the Designer section of the SQL Server Management Studio (SSMS) Options window is selected.
either enable that option or use SQL to allow null for the column:

 for example

alter table MyTable alter column MyDate7 datetime NULL
koilaAuthor Commented:
Scott PletcherSenior DBACommented:
It's extremely inefficient, and dangerous, to use the GUI to make those types of table changes.  SQL writes a script that copies the table out, mods the table, and copies it back in.

Instead, use the ALTER TABLE command, as shown above.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now