1

Im sure I am missing something here, but here goes anyway.

I am having an issue with my SQLite database, when accessing an integer field which has not been set, I am getting 0 in return. This is documented behaviour, although is not helping me as I dont know whether the the cell is empty of if indeed is is supposed to be zero.

My one idea was to write NULL into the field if it is empty. Will that work? Is there another way to do this?

Filburt
  • 17,626
  • 12
  • 64
  • 115
Stoff81
  • 597
  • 4
  • 15

1 Answers1

2

using NULL values to signal that the value hasn't been set is fairly standard. you might want to use a DEFAULT value for the column - and have that default be NULL.

blueberryfields
  • 45,910
  • 28
  • 89
  • 168