I'm not an expert at SQL at all, so I want to know is there a way to execute SQL queries with some logic without any additional functions or stored procedures. I have two tables: governor and figure. I need to union them by the column full_name and add additional column where it will say is a person a governor or no. But I have no clue how to do it. This is my initial query:
SELECT full_name FROM governor
UNION
SELECT full_name FROM figure
Is there a way to do this only within the query?