mysql - Is it good to use a default of NULL? -
i have columns may contain data if user wants provide it.
example | email | first name | last name |
email - required column set not null - default: none
first name - not required column set null - default: null
last name - not required column set null - default: null
in phpmyadmin when creating/editing column; has option saying default: drop down showing none | defined | null | current timestamp
because first name | last name optional , not required should choose default null or maybe none?
which best , why please?
i know there many discussions on not find answered question; more in regards allowing null or not null, question default value.
you should set them default:null if user doesn't provide info fields, should null obviously.
Comments
Post a Comment