Here you can find the source of normalizeTableName(String table, Connection con)
public static String normalizeTableName(String table, Connection con) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; public class Main { public static String normalizeTableName(String table, Connection con) throws SQLException { for (String t : getTables(con)) { if (t.equalsIgnoreCase(table)) { return t; }//from ww w. j a v a2 s.co m } return table; } public static List<String> getTables(Connection con) throws SQLException { String[] types = { "TABLE" }; ResultSet rs = con.getMetaData().getTables(null, null, "%", types); List<String> tables = new ArrayList<String>(); while (rs.next()) { tables.add(rs.getString("TABLE_NAME")); } rs.close(); return tables; } }