Home >Backend Development >PHP Tutorial >Is it better to set default to Null for a certain field in the database table, or '', or Empty String? On the mobile phone, I just want to return empty

Is it better to set default to Null for a certain field in the database table, or '', or Empty String? On the mobile phone, I just want to return empty

WBOY
WBOYOriginal
2016-08-31 08:41:071102browse

When a certain field in the database is set to Null, the mobile terminal will return Null by default. If I want the mobile terminal to return null, I have to make a judgment.
1. If I want the mobile phone to return empty without making any judgment, how should I set the table field default?
2. Is it better to set the table field default to Null, "", or Empty String? Are they different?

Statement:
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