GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

sql_mode

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • sql_mode

    Hello,
    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.

  • #2
    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.

    Comment

    Working...
    X