DatabaseMetaData dbm = con.getMetaData();
// check if "employee" table is there
ResultSet tables = dbm.getTables(null, null, "employee", null);
if (tables.next()) {
// Table exists
}
else {
// Table does not exist
}
More Related Contents:
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- Show JDBC ResultSet in HTML in JSP page using MVC and DAO pattern
- How to establish a connection pool in JDBC?
- java.sql.SQLException: – ORA-01000: maximum open cursors exceeded
- Cannot issue data manipulation statements with executeQuery()
- JDBC Class.forName vs DriverManager.registerDriver
- IO Error: The Network Adapter could not establish the connection
- How to call oracle stored procedure which include user-defined type in java?
- How do I connect to a SQL Server 2008 database using JDBC?
- Java JDBC Access denied for user [closed]
- Why does autoReconnect=true not seem to work?
- SQL prepared statement how to select via multiple possible menu selections?
- Driver.getConnection hangs using SQLServer driver and Java 1.6.0_29
- JDBC returning MySQLSyntaxError Exception with correct statement
- Problems reading/writing UTF-8 data in MySQL from Java using JDBC connector 5.1
- JDBC- Implementation of interfaces
- PreparedStatement setNull(..)
- JDBC SQLServerException: “This driver is not configured for integrated authentication.”
- ojdbc14.jar vs. ojdbc6.jar
- Java JDBC ignores setFetchSize?
- com.mysql.jdbc.PacketTooBigException
- Where do I have to place the JDBC driver for Tomcat’s connection pool?
- How to execute multiple SQL statements from java
- Connect To SQL Server With Windows Authentication From A Linux Machine Through JDBC
- Oracle’s RETURNING INTO usage in Java (JDBC, Prepared Statement)
- NoClassDefFoundError sun/io/ByteToCharConverter with InterBase JDBC driver
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- MyBatis executing multiple sql statements in one go, is that possible?
- A persistent connection with JDBC to MySQL
- Getting Hibernate and SQL Server to play nice with VARCHAR and NVARCHAR