My SQL UPDATE using NULL My SQL UPDATE command can be used to update a column value to NULL by setting column_name = NULL, where column_name is the name of the column to be updated.
The following My SQL statement will update pub_lang column with NULL if purch_price is more than 50.
The following My SQL statement will update the 'receive_qty' column of newpurchase table with a new value 25 if the value of purch_price is more than 50.
This can also be used to change the column to NULL if the column has no default and is defined to allow null values.
Compound assignment operator: = Add and assign -= Subtract and assign *= Multiply and assign /= Divide and assign %= Modulo and assign &= Bitwise AND and assign ^= Bitwise XOR and assign |= Bitwise OR and assign Returns updated data or expressions based on it as part of the UPDATE operation.
Any characters not found in this code page are lost.
DEFAULT Specifies that the default value defined for the column is to replace the existing value in the column.