I have several separate tables defined in my (in construction) database that shares the same fields. But also in database, I have other tables that aren't related to data, so to differentiate, I mark some of them with the same comment 'data_table'.
It is useful in procedures:
select table_name from information_schema.tables where table_schema = 'myDB' and table_comment = 'data_table'
I need to do a select over all tables marked with this comment, to obtain something like, but not using JOIN because every time I have to add more table names in that select.
ID Value
CAP-001 0.1uF <-- from capacitor table
CAP-002 1nF
RES-001 1k <-- from resistor table
RES-002 100k
<-- from other table in the future
It is possible? Thank you very much for suggestions.