In an OceanBase database, a NOT NULL constraint requires that a specific column contain no nulls.
Syntax:
column_name data_type NOT NULL;
If a NOT NULL constraint is defined on a column, you cannot insert a NULL into or update an existing value to a NULL in the column.
To be more exact, a NOT NULL constraint on a column is actually an attribute of the column because you cannot find information about NOT NULL constraints among the constraint-related tables in the INFORMATION_SCHEMA, such as the CHECK_CONSTRAINTS, REFERENTIAL_CONSTRAINTS, TABLE_CONSTRAINTS, and TABLE_CONSTRAINTS_EXTENSIONS tables.
In an OceanBase database, you can delete but not add a NOT NULL constraint on a column. Syntax to delete a NOT NULL constraint on a column:
ALTER TABLE table_name MODIFY column_name data_type;