MySQL: NULL vs “”
Use default null
. In SQL, null
is very different from the empty string (""). The empty string specifically means that the value was set to be empty; null
means 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 null
as opposed to default ""
is so small that it approaches negligibility; however, the potential value of using the proper defaults as convention dictates is quite high.
http://stackoverflow.com/questions/1106258/mysql-null-vs
empty string
'DATABASE' 카테고리의 다른 글
쿼리 현재 날짜 -1 (0) | 2015.12.17 |
---|---|
테이블에서 테이블로 옴기는 방법 (0) | 2015.12.01 |
MySQL 날짜 / 시간 데이터 타입 (0) | 2015.11.17 |
mysql 테이블 수정 컬럼 추가 (0) | 2015.08.26 |
연산시 값이 없으면 null 로 들어간다 (0) | 2015.06.24 |