matthias.edrich wrote:
> Hi All,
> ...
> getTables(String catalog,String
> schemaPattern,String tableNamePattern,String[]
> types)
>
> I am quite successful leaving the "catalog" value
> as null as well as "schemaPattern."
>
> However, what would be the equivalent in MySQL to
> the Oracle "catalog" and "schema"?
>
In MySQL JDBC connector, the first argument, or catalog, to getTables() targets
the database or schema in MySQL, which is the collection of tables.
Currently, the 2nd schema argument does not seem to do anything.
ResultSet rs = dmd.getTables( "test", null, null, new String[] {"TABLE"} );
while(rs.next()) {
System.out.print(rs.getString(1) + ", " +
rs.getString(2) + ", " +
rs.getString(3) + ", " +
rs.getString(4) + ", " +
rs.getString(5) + ", " +
"\n");
}
The output of this program is a listing of tables in my local "test" schema/database:
test, null, emp, TABLE, ,
test, null, t1, TABLE, ,
So it would seem to me that the JDBC Oracle schema argument would work
the same as the MySQL JDBC catalog argument.
Regards,
Josh
Josh Chamas
Director, Professional Services
MySQL Inc., www.mysql.com
Get More with MySQL!
http://www.mysql.com/consulting