Here you can find the source of getDefaultScale(int sqlType)
public static int getDefaultScale(int sqlType)
//package com.java2s; /*********************************************************************************************************************** * Copyright (c) 2009 Sybase, Inc. 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 * /*from w w w . j a v a2 s . c o m*/ * Contributors: Sybase, Inc. - initial API and implementation **********************************************************************************************************************/ import java.sql.Types; public class Main { public static int getDefaultScale(int sqlType) { switch (sqlType) { case Types.TIME: case Types.TIMESTAMP: return 3; case Types.DECIMAL: case Types.DOUBLE: case Types.FLOAT: case Types.NUMERIC: case Types.REAL: case Types.OTHER: case Types.INTEGER: case Types.SMALLINT: case Types.TINYINT: case Types.VARCHAR: case Types.BIGINT: case Types.BINARY: case Types.BIT: case Types.BLOB: case Types.BOOLEAN: case Types.CHAR: case Types.DATE: case Types.REF: case Types.STRUCT: case Types.VARBINARY: case Types.CLOB: case Types.DATALINK: case Types.DISTINCT: case Types.JAVA_OBJECT: case Types.LONGVARBINARY: case Types.LONGVARCHAR: case Types.NULL: default: return 0; } } }