Skip to content
Advertisement

how to select values from tables which start with prefix

I am new to oracle database, I have about 100 tables which starts with prefix like PRE:

I need in java to select name and values from all tables which start with prefix PRE; something like this:

is this possible?

Now I would like to create select statement in java to get name and value from all tables which starts with PRE

Advertisement

Answer

If you really need this, the following can be a way:

Here I user USER_TABLES, while you may need ALL_TABLES or DBA_TABLES, depending on your needs and/or permissions.

However, at first sight, this does not seem the best possible design, so maybe you would re-consider it.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement