Created
August 10, 2020 08:38
-
-
Save jirkafm/f699e657469fc6648f8ec9daaef711f2 to your computer and use it in GitHub Desktop.
H2 - get all table names from current schema (Spring JPA)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Query query = testEntityManager.getEntityManager() | |
.createNativeQuery("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = SCHEMA()"); | |
final List result = query.getResultList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment