Set a Column Value to NULL in MariaDB
The fundamental syntax to set a column value to NULL is as follows.
Syntax:
UPDATE table_name
SET column_name = NULL
WHERE condition;
Explanation:
- table_name: Name of your table.
- column_name: Name of the column you want to set null.
- WHERE condition: Condition with any necessary criteria to identify the records you want to update.
How to Set a Column Value to NULL in MariaDB
In MariaDB, the NULL represents an unknown value in a column. Changing a column value to NULL is the most common operation performed in MariaDB that allows us to remove existing data in a specific field. It is applicable in different ways including data correction, record inclusions and values setting. In this article, we will look through the different methods with which we can set a column value to NULL in MariaDB.
Contact Us