应该没问题
得到0不很好吗?
如果你一定要区分的话
就先当String取出
然后判断,转化为Float
再对值进行处理

解决方案 »

  1.   

    public float getFloat(String columnName)
                   throws SQLException
    Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language. Parameters:
    columnName - the SQL name of the column 
    Returns:
    the column value; if the value is SQL NULL, the value returned is 0 
    Throws: 
    SQLException - if a database access error occurs我想这样更好,因为本来数字就没有空这个概念,而且在设计数据库时你本来就应该设置却省值。你看看是否该一下你的程序的逻辑,Java这样更近思维和严密啊!