Re: Detecting if a table in a database already exists ?

From: Michael Borgwardt (brazil_at_brazils-animeland.de)
Date: 10/12/04


Date: Tue, 12 Oct 2004 21:18:51 +0200

Thorsten Meininger wrote:
> Sorry for this newbie question:
> How do I find out from a java source if a table in a database already exists?
>
> I cannot believe that I have to execute a SELECT statement and if there is an exception
> I know that the table does not exist. But this is a really inconvenient solution.
> There must be a direct request statement.

Not quite, but the command SHOW TABLES will return a list of all tables that exist.



Relevant Pages