4

Let's say I have a column not defined as NOT NULL, meaning that particular column may be null. If I insert a row with a null entry for that field, how many bytes does it take to store that entry?

In more general terms, if a table has lots of NULL entries in it, is it wasting storage space?

Zach Rattner
  • 20,745
  • 9
  • 59
  • 82
  • I'm probably not understanding. Are you saying it has a NOT NULL constraint? If you have a column with a NOT NULL constraint, then it shouldn't allow you to insert a new row with a null for that field. – Mark Wilkins May 12 '11 at 02:57
  • I edited the question. That column may contain a null entry. – Zach Rattner May 12 '11 at 03:01

1 Answers1

3

Here is a link answering your question. Null in Mysql

Community
  • 1
  • 1
Anupam Saini
  • 2,431
  • 2
  • 23
  • 30