Here you can find the source of isNumericType(int datatype)
Parameter | Description |
---|---|
datatype | a parameter |
public static boolean isNumericType(int datatype)
//package com.java2s; /******************************************************************************* * Copyright (c) 2005, 2010 Sybase, Inc. and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:// w ww . j a v a 2s. co m * Sybase, Inc. - initial API and implementation *******************************************************************************/ import java.sql.Types; public class Main { /** * Check if the given SQL type is numeric data type * @param datatype * @return */ public static boolean isNumericType(int datatype) { return datatype == Types.BIGINT || datatype == Types.DECIMAL || datatype == Types.DOUBLE || datatype == Types.FLOAT || datatype == Types.INTEGER || datatype == Types.NUMERIC || datatype == Types.REAL || datatype == Types.SMALLINT || datatype == Types.TINYINT; } }