1. Establish a JDBC data source and judge it through the Java.sql.DatabaseMetaData interface.
For example:
(free learning video tutorial recommendation: java video tutorial)
2. Directly use sql statement to query from the database
select * from user_all_tables where table_name='tableName'
If the result is empty, it means it does not exist, how to If the result is not empty, it means it exists;
Related article tutorial sharing: java introductory tutorial
The above is the detailed content of Java determines whether a certain table exists in the database. For more information, please follow other related articles on the PHP Chinese website!