Hi Is there any way for setting all the rows of a column to a null value? thanks
+2
A:
How about something simple like : Update MyTable Set MyColumn = NULL
Or, did you mean you wanted to set all columns in a row to NULL? If so, you have a database design problem. You should greatly limit what columns in a database accept NULL values.
Randy Minder
2010-04-30 17:32:46
I want all a column that all its rows are null
2010-04-30 17:36:08
@user329820 - Then the query I showed you will do it.
Randy Minder
2010-04-30 17:48:24
thanks a lot for your answer
2010-04-30 17:55:17
@user329820 - Glad to help!
Randy Minder
2010-04-30 18:00:40
+2
A:
Sure.
UPDATE table SET column = NULL
If you don't include a WHERE
clause, the statement will affect all the rows in the table.
Syntactic
2010-04-30 17:32:47