3 ms·
My understanding was that it's "not allowed" rather than "undefined". SQL returns NULL if any input value into an expression is NULL, not if an invalid operati
by hans_castorp 2y ago
My understanding was that it's "not allowed" rather than "undefined".
SQL returns NULL if any input value into an expression is NULL, not if an invalid operation is attempted. If the expression contains an error, SQL throws an error, it doesn't return NULL.
The SQL standard requires to error out in this case.
Also: I don't know of any system that would not result in an error when you try to divide something by zero.