selectni si k tomu meno tabulky
neviem aku mas DB ale pre MySQL by to mohlo vyzerat nejak takto:
Kód:
select stlpec1, stlpec2, stlpec3, table_name from tab1, information_schema.tables where stlpec3 is not null and table_name = 'tab1'
union all
select stlpec1, stlpec2, stlpec3, table_name from tab2, information_schema.tables where stlpec3 is not null and table_name = 'tab2'
order by stlpec3 desc