over 9 years ago
In MySQL, the NOT NULL constraint is used to restrict a column to NOT accept NULL values.
The NOT NULL constraint allows a column to always contains a value which means you cant not insert/update a record in a table without passing value for that column on which you have applied the NOT NULL constraint.
The below statement doesn't allow to "id" column and "first_name" column to accept NULL values:
Example
Hope this will help you :)
0 Comment(s)