As you can see in the print screen above, I am wondering, if it is possible to check if there is one thing in two tables at once WITH gaining whole one row if found (logical 1). Without making 2 queries. I need to look, if "fajne-to-jest" is in table1 or table2, and then take data row. I'm doing it in 2 queries... but question is, is it possible to check this information using one query? Mabye something else? Most efficent way? The best way?
@Gordon Linoff gave me this:
select (exists (select 1 from table1 where url = 'fajne-to-jest')) as in_table1,
(exists (select 1 from table2 where url = 'fajne-to-jest')) as in_table2;
And I want query to produce this + data from this row, like this: