Mark Matthews wrote: > MySQL doesn't have schemas (currently). They are being developed in a > future version. The DatabaseMetaData interface in JDBC has a method, > 'getSchemaTerm' which tells you whether a certain database supports > schemas or not (returning "" when schemas are not supported). MySQL > supports _catalogs_, so you would use the DatabaseMetaData method > 'getCatalogs' to see all catalogs (databases in 'mysql' vernacular) in > your database, or the 'getCatalog' method in the Connection interface to > retreive the catalog the connection is currently using.
Thanks Mark, that helps a lot. If I call database.getCatalogs(); I get a list of all of my databases ... about 6 of them - so thats ok. If I then call databasemetadata.getTables(null,null,"table-name",null); I get catalogName as "", schemaName as null, tableName as "table-name". So why is it returning the catalogName for this table as "" (i.e no catalog) if catalog maps across to 'database' in MySQL ? TIA -- Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]