SQL Compare 13

Help for older versions available.

These pages cover SQL Compare 13, which is not the latest version. Help for other versions is also available.

Error Comparing DB1 vs DB2. Cannot insert the value NULL into column 'YourColumn', table 'database.dbo.tmp_rg_xx_MyTable'; column does not allow nulls. INSERT fails

This error occurs when adding a new column to an already populated table, and the new column does not allow null values.

To fix this:

  • assign a default value to the column in the source database, or
  • set the column to allow nulls, and then set it back after you have the correct data inserted.

Didn't find what you were looking for?