Null for all rows in a column!

Is there a way to set all column rows to null? thank

+3
source share
2 answers

How about something simple: Update MyTable Set MyColumn = NULL

Or, did you mean that you want to set all the columns in a NULL row? If so, you are having a database design issue. You should significantly limit which columns in the database are NULL.

+5
source

Of course.

UPDATE table SET column = NULL

If you do not include a clause WHERE, the statement will affect all rows in the table.

+5
source

Source: https://habr.com/ru/post/1743549/


All Articles