Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between DEFAULT NULL and the CHECKBOX NULL mysql?

Tags:

null

mysql

What is the difference between DEFAULT NULL and the CHECKBOX NULL mysql?

I can set default as NULL or there is a checkbox below which I can check to say NULL?

What's the difference?

like image 629
cgwebprojects Avatar asked Jan 22 '12 22:01

cgwebprojects


1 Answers

Having a column DEFAULT NULL means if you don't set a value for the column, it will be NULL by default.

Having a column NULL(able) means it can be NULL at all, otherwise it will require you to set a value for the column, either by default or in the insert query. Only check that box if the value is supposed to be optional.

like image 155
Joachim Isaksson Avatar answered Sep 27 '22 22:09

Joachim Isaksson