SQLite Forum

HEX function returns empty string on null input, normal?
Login
Nope. From the same page: "Abs(X) returns NULL if X is NULL."

The hex() function is the only function that has the phrase "interprets its argument" in it's documentation. All the other functions on that page either explicitly mention a return value for NULL arguments or require their arguments to be strings without mentioning NULL as an argument. EDIT: and return NULL when called with a NULL argument instead.

It may not be overtly logical, but it is documented.