Unable to modify table

  • I am trying to remove a tick from Allow Nulls Topic id column

    I go to EM and then Design Table. uncheck allow nulls and then get the following error when trying to save my changes :-

    'FORUM_TOPICS (myname)' table

    - Unable to modify table.  

    ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'TOPIC_ID', table 'mydatabase.myname.Tmp_FORUM_TOPICS'; column does not allow nulls. INSERT fails.

    [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.

  • SELECT * FROM mydatabase.myname.Tmp_FORUM_TOPICS WHERE TOPIC_ID IS NULL

    This will find the offending data rows.

    You can then determine whether to delete those rows or reassign TOPIC_ID. After doing this you will be able to uncheck the NULL column. This is with the proviso that the table isn't replicated.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply