The SQL Standard describes 'BASE TABLE', 'VIEW', 'GLOBAL TEMPORARY', 'LOCAL
TEMPORARY', and 'SYSTEM VERSIONED' table types. H2 doesn't support system
versioned tables, but supports all other types.
The JDBC Specification doesn't describe (and shouldn't describe) any table
types.
Javadoc of DatabaseMetaData.getTables() also doesn't describe any table
types, but it provides a list of *possible examples* ("TABLE", "VIEW", "SYSTEM
TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM"). The
*actual* table types available in database are returned by
DatabaseMetaData.getTableTypes(), this method should return what database
is actually has and returned list of actual table types is not required to
have mentioned example table types. This area is database and
driver-specific.
Some parts of JDBC metadata look like they were written for MySQL and
partially for Oracle, because they include some exotic features of these
systems, but don't include many common standard features.
It means you can get some basic information from DatabaseMetaData, but
there are no unified ways for other features. The INFORMATION_SCHEMA from
the SQL Standard is designed significantly better, but Standard also cannot
describe all possible features of all database systems. Unfortunately, some
database systems don't have this schema, but have some own non-standard and
non-portable sources of information. Various applications and libraries use
different queries for different database systems due to all these problems.
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/h2-database/a8537dfe-cc21-45c1-96f3-c6d7e04be43bn%40googlegroups.com.