Here you can find the source of isExistsDerbyTable(Connection derbyConnection, String schema, String table)
public static boolean isExistsDerbyTable(Connection derbyConnection, String schema, String table) throws SQLException
//package com.java2s; /*// ww w . j a va 2 s .co m * (C) Copyright IBM Corp. 2008 * * LICENSE: Eclipse Public License v1.0 * http://www.eclipse.org/legal/epl-v10.html */ import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static boolean isExistsDerbyTable(Connection derbyConnection, String schema, String table) throws SQLException { ResultSet rs = derbyConnection.getMetaData().getTables(null, schema, table, null); boolean isTableExists = rs.next(); // Must close ResultSet - vital step - otherwise we can hit db locks // seen with: vti.TestICARESTSelfSameQueryJoinsCached.testDistributedSearchSelfSameJoinRestrictedFetchSizeAgainstOtherNode rs.close(); return isTableExists; } }