Setting a field to null in SQL Server Enterprise Manager

October 30, 2007

We always end up in a situation where we need to update a value directly in the recordset and set it to null. E,g. when we are dealing with DateTime fields and wish to set the field to null. If you just leave the field blank and try navigating to the next row, SQL Server throws an error.

To explicitly set a value to null, click on the field in the resultset and type CTRL-0 (zero). This sets the field to null.
In SQL Server 2005 Management Studio, do not forget to click on Execute button to save the edits.