I have a table TABLES_IDS
that looks like this:
Table_ID Table_Name Table_Column
-------- ---------- ------------
100 Attributes Attribute_id
101 NewSamples Section_id
...
I have a "first query" that returns several values of Table_Name
. This Table_Name
is actually the name of another table, and Table_Column
is a column. I need to do the following:
- For every obtained
Table_Name
, I need to retrieve correspondingTable_Column
value. Using
Table_Name
andTable_Column
, create a new sql query that looks e.g. asSELECT FROM Table_Name WHERE Table_Column = 12345
Automatically repeat everyting for every
Table_Name
returned by the very first query.