I am new to mySQL, so have few questions on how things work in this environment.

Though I have placed constraints such as NOT NULL, on a table, it is accepting null values into the columns of a table. How do I restrict?

I would like to know more on sql_mode and how to set it at the server level, so that it applies to all the databases.

Thank you for looking at this post.

You should look at the MySQL manual for SQL_MODE. If you have a column defined NOT NULL, then it won’t store NULL, but it will convert the NULL into the column’s default value.

It is impossible to completely prevent this, but SQL_MODE can help make it less common.