I want to list all table names from database. My application has to be independent from DBMS. Different DBMS has different command to list tables, e.g:
PstgreSQL:
SELECT * FROM pg_catalog.pg_table
s
MySQL:
show tables
Oracle:
SELECT DISTINCT OBJECT_NAME
FROM DBA_OBJECTS
WHERE OBJECT_TYPE = 'TABLE'
I think that I should use hibernate because writing different SQL query for all DBMS is uncomfortable. There are examples in network how to list tables in hibernate, but all examples which I found list only mapped entitites. I want to list all table names regardless of hibernate entities.