NOT NULL
NOT NULL is a SQL statement in the Constraints category. Ensures a column cannot contain NULL values. The syntax is column type NOT NULL. It returns constraint. A typical example: CREATE TABLE users (name VARCHAR(100) NOT NULL); -- INSERT without name will fail A close relative is PRIMARY KEY, which a column or set of columns that uniquely identifies each row. Only one PK per table. Automatically creates a unique index. A close relative is FOREIGN KEY, which ensures referential integrity: values in this column must exist in the referenced parent table. A close relative is UNIQUE, which ensures all values in a column (or combination) are unique across the table. Allows NULLs (multiple NULLs allowed). More about this category: Table constraints — PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, DEFAULT. Related Constraints entries: PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, DEFAULT, EXCLUDE CONSTRAINT, PRIMARY KEY (Composite), FOREIGN KEY ON DELETE SET NULL.