在sql中,如何在Oracle 10g上选择列(数据类型:数字)等于Infinity的表的行?
select * from MYTABLE where MYCOLUMN = Infinity;
解决方法
从
Laurent Schneider开始:
select * from MYTABLE where MYCOLUMN = binary_double_infinity;
或者使用隐式演员,只需:
select * from MYTABLE where cast(MYCOLUMN as binary_double) = binary_double_infinity;
或者使用the is infinite
floating point condition:
select * from MYTABLE where cast(MYCOLUMN as binary_double) is infinite;
我会附上一个sql小提琴,但正如Laurent所说,“期待你的oracle客户端出现很多错误”;这在sql Developer中有效,但sql Fiddle会出现数字溢出.