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
2009-01-14 21:02:00
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
2009-01-14 21:04:49
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
2009-01-14 21:05:05
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
2009-01-14 21:09:59
@TheTXI good catch. As written, that SQL is mighty dangerous.
Michael Haren
2009-01-14 21:12:01
Wow, this could be awful. Please change your answer!
Geoffrey Chetwood
2009-01-14 21:12:18
Fixed. Please read the question next time.
Geoffrey Chetwood
2009-01-14 21:14:21
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
2009-01-14 21:51:35