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

WBOY
Release: 2023-03-01 19:00:02
Original
1272 people have browsed it

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template