The default values ​​for the varchar and int mysql data types

The screenshot shows 3 typical definitions of a data type: id (auto-increment), title, and number.

1.- What are the differences between: noneand NULL?
2.- Should I choose as defined: ''for varchar types when I want an empty string?
3.- Should I set a as defined: 0default value for autoincrement int types?

enter image description here

+5
source share
1 answer

There is no default value by default. If the value is not specified in the insert, the request will fail with a default error.

NULL - NULL, , NULL (). varchar '', NULL .

int ( : ), .

+7

All Articles