In OceanBase Database, a NOT NULL constraint is used to ensure that a specified column of a table is never assigned a NULL value.
The syntax is as follows:
column_name data_type NOT NULL;
If a NOT NULL constraint is defined on a column, you cannot insert a NULL value into or update an existing value to 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 INFORMATION_SCHEMA, such as the CHECK_CONSTRAINTS, REFERENTIAL_CONSTRAINTS, TABLE_CONSTRAINTS, and TABLE_CONSTRAINTS_EXTENSIONS tables.