db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: checking if table exists
Date Wed, 03 Oct 2007 12:52:44 GMT
Wolf Bublitz <wolf.bublitz@uni-dortmund.de> writes:

> Hi,
> I'm new to Derby DB and I want to know how it is possible to check if
> a table exits. Via the command line tool I can get a list by typing
> "SHOW TALBES" but in Netbeans' db-editor  this does not work.

The SHOW TABLES command is implemented in the command line tool (ij),
and not recognized by Derby's SQL parser. So you can't issue the command
in a command line tool that hasn't implemented the show command
itself. NetBeans doesn't implement that command, but when you have
established a connection to the database, it should give you a list of
tables (under Databases in the Services tab).

In JDBC, you get the same information by calling the getTables() method
in java.sql.DatabaseMetaData.

Knut Anders

View raw message