public ArrayList<Properties> doGetDBTable(String schemaName) throws Exception
{
java.sql.DatabaseMetaData meta = conn.getMetaData();
java.sql.ResultSet schemas = meta.getTables(null, schemaName.toUpperCase(), "%", new String[] {"Table"});
ArrayList<Properties> list = new ArrayList<Properties>();
while (schemas.next())
{
Properties p = new Properties();
String table = schemas.getString(3);
String tableSchema = schemas.getString(2);
p.setProperty("Table", tableSchema+"."+table);
list.add(p);
}
return list;
}
How to get the tables of one schema?
最新推荐文章于 2022-03-20 18:08:35 发布