tags:

views:

2993

answers:

4

How do I clear the value from a cell and make it NULL?

+8  A: 

If you've opened a table and you want to clear an existing value to NULL, click on the value, and press Ctrl+0.

Zack Peterson
A: 

If you are using the table interface you can type in NULL (all caps)

otherwise you can run an update statement where you could:

Update table set ColumnName = NULL where [Filter for record here]
TheTXI
A: 

Ctrl+0 or empty the value and hit enter.

Eppz
A: 

I think @Zack properly answered the question but just to cover all the bases:

Update myTable set MyColumn = NULL

This would set the entire column to null as the Question Title asks asks.

To set a specific row on a specific column to null use:

Update myTable set MyColumn = NULL where Field = Condition.

This would set a specific cell to null as the inner question asks.

Jeff Martin
His question text asks about clearing the value from a cell, not an entire column. You would potentially have to do a where clause to find the particular record you want to edit.
TheTXI
@TheTXI good catch. As written, that SQL is mighty dangerous.
Michael Haren
Wow, this could be awful. Please change your answer!
Geoffrey Chetwood
Fixed. Please read the question next time.
Geoffrey Chetwood
I purposely left the condition off actually... if you look at the Big Bold Question of his title, he asks how you set a column to null.
Jeff Martin