Java SQL Type isNumeric(int sqlType)

Here you can find the source of isNumeric(int sqlType)

Description

Check whether the given SQL type is numeric.

License

Apache License

Declaration

public static boolean isNumeric(int sqlType) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.sql.*;

public class Main {
    /**//from ww  w. j  av a 2 s  .co m
     * Check whether the given SQL type is numeric.
     */
    public static boolean isNumeric(int sqlType) {
        return (Types.BIT == sqlType) || (Types.BIGINT == sqlType) || (Types.DECIMAL == sqlType)
                || (Types.DOUBLE == sqlType) || (Types.FLOAT == sqlType) || (Types.INTEGER == sqlType)
                || (Types.NUMERIC == sqlType) || (Types.REAL == sqlType) || (Types.SMALLINT == sqlType)
                || (Types.TINYINT == sqlType);
    }
}

Related

  1. isNumberType(int aSqlType)
  2. isNumberType(int sqlType)
  3. isNumeric(int dataType)
  4. isNumeric(int dataType)
  5. isNumeric(int pColumnType)
  6. isNumeric(int sqlType)
  7. isNumericType(int datatype)
  8. isNumericType(int type)
  9. isPlainJdbcType(int type)