Skip to main content
3 of 3
edited tags
Paul White
  • 90.3k
  • 30
  • 424
  • 663

Add a column with Not Null

I have a existing table in which i am adding a column as NgoId whose datatype is int. I want to add as NOT NULL to the column .

When I'm adding this I am getting the following error:

Unable to modify table. Cannot insert the value NULL into column 'NgoId', table 'CSR.dbo.Tmp_tbl_post_category'; column does not allow nulls. INSERT fails. The statement has been terminated.

Please help how to add the column with NOT NULL.

hud
  • 203
  • 2
  • 6
  • 21