Is it better to use default null or default "" for text fields in MySQL?
Why?
Update: I know what means each of them. I am interested what is better to use considering disk space and performance.
Update 2: Hey ppl! The question was “what is better to use” not “what each means” or “how to check them”…
Use default
null. In SQL,nullis very different from the empty string (“”). The empty string specifically means that the value was set to be empty;nullmeans that the value was not set, or was set to null. Different meanings, you see.The different meanings and their different usages are why it’s important to use each of them as appropriate; the amount of space potentially saved by using
default nullas opposed todefault ""is so small that it approaches negligibility; however, the potential value of using the proper defaults as convention dictates is quite high.