Firebird News

Wednesday, November 21, 2007

Firebird/InterBase - UDF and NULL parameters - DO not USE NULLs

Do not use NULLs

It is quite a frequent mistake to use NULLs for purposes it was not intended to. For example you have column MIDDLE_NAME in your table; if the person does not have middle name, you should fill in empty string (''); but sometimes people use NULL instead - it is wrong, because NULL means unknown value, not missing/not assigned/empty one. Using NULL as middle name means - "this person probably has a middle name, but we do not know what it is" - and not - "this person does not have any middle name".
Firebird/InterBase - UDF and NULL parameters

Blogged with Flock

No comments: