TSQL: update column to zero

The student is here. It should be esasy, but I can't figure it out.

I have a table like this:

ID -- NAME -- CHOICE 1 -- John -- book 2 -- Matt -- pen 3 -- Linda -- bag . . 

What will be the script to turn all the data in the CHOICE column to null?

Thanks a ton

+7
source share
1 answer

You should use the UPDATE statement without a WHERE clause (so it updates every row)

 UPDATE YourTable SET Choice = NULL 
+17
source

All Articles