Home  >  Article  >  Backend Development  >  What is the relationship between mysql default and whether it is empty?

What is the relationship between mysql default and whether it is empty?

WBOY
WBOYOriginal
2016-12-01 00:25:531176browse

RT
By the way, I saw a blog saying this
If there is a default value, it is not allowed to be empty, otherwise it will be inconsistent. After the data is modified, it will still be its default value
At the same time, what I want to know is if I set the default value Then if the query is not set to be nullable, will the default be automatically filled in? What will be the consequences if it is set to be nullable? Of course, I am referring to the strict mode

Please come and save me


What is the relationship between mysql default and whether it is empty?

Reply content:

RT

By the way, I saw a blog saying this
If there is a default value, it is not allowed to be empty, otherwise it will be inconsistent. After the data is modified, it will still be its default value
At the same time, what I want to know is if I set the default value Then if the query is not set to be nullable, will the default be automatically filled in? What will be the consequences if it is set to be nullable? Of course, I am referring to the strict mode

Please come and save me


What is the relationship between mysql default and whether it is empty?

If you don’t want to, how about trying it yourself. You'll know the answer to some things just by trying them yourself.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn