should I use null or 0
659232Jun 8 2009 — edited Jun 10 2009I am going to alter my table to add a column, IsValidFlag.
I thought I can just add a type of number(1), with value 1 or 0. Because I am sure the value is either 1 or 0.
Another developer prefer to using 1 or null. He argues that null takes less disk space than a number 0. The table is 15G, about 2 million records. Pretty big! He wants the table to take as small space as possible so the table can fit in database cache.
I think using 1 or 0 is very straightforward, while using 1 or null seems hard to understand, because null means unknown.
What is your suggestion?
Thanks in advance.
--Gary