how to add a not null constraint in sql code example Example: how to add not null constraint in sql ALTER TABLE table_name MODIFY column_name datatype NOT NULL;