In MySQL, by default a column can hold NULL values, the NOT NULL
constraint on the other hand restrict column to NOT to accept NULL values. The NOT NULL
constraint forces the column to always accept a value. Using NOT NULL
constraint you can make sure a column cannot have a NULL value.
Note:
In the above example, we are creating new table called "tblCustomer" using NOT NULL
constraint. The NOT NULL
constraint enforces column "custId", firstName", "lastName" and "address" to NOT to accept NULL values.
You can use MySQL Command Line Client to enforces column to NOT to accept NULL values.