Possible to represent NaN in scientific notation?

Viewed 24

Is there a way to represent NaN in SQL with some sort of 'special value' ? Or is it always necessary to use a cast from a string to represent it, for example:

SELECT CAST('NaN' AS FLOAT)
-- NaN

Is there any such value-construction I can use directly, such as:

SELECT 1.2345e-6789
-- NaN
1 Answers

You should be able to use 0.0/0.0: IEEE 754 requires that the division of zero by zero to result in NaN.

Related