Hacker News new | past | comments | ask | show | jobs | submit login

With an enum you’d have to check the unset state separate as well.



He meant that in some SQL Dialects you cannot check FIELD = NULL, you have to use FIELD IS (NOT) NULL (like Oracle). Therefore you cannot use FIELD inside an IN clause either.


But with an (NOT NULL) enum/integer/string or however you are representing it, every state is a regular case. Not a special case. Null nearly always needs some special treatment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: