From the doc :
Oracle Database's numeric data types store positive and negative fixed and floating point numbers, zero, infinity, and the values ββthat result from an undefined operation - not a number or NAN .
As far as I know, you can get NaN only in the binary_float or binary_double column ; these data types have their own literals for NaN, too , and there is a condition is nan , and nanvl() function to manipulate them.
An example of a way to get such a value is dividing the float / double value by zero:
select 0f/0 from dual; 0F/0
... so if you see NaNs, your application logic or underlying data may be broken. (Note: you cannot get this with the "normal" type of number, you will get ORA-01476: divisor is equal to zero if the numerator is not floating or double).
You will not get NaN for a zero or negative number. It is also possible that you have a string column and the application puts the word "NaN", but storing numbers as strings is a bad idea at many levels, so hopefully this is not so.
source share