I am somewhat stumped on a seemingly simple problem. I have a table set up such as,
CREATE TABLE cities (
column_1 TEXT,
column_2 TEXT);
Where the contents of these tables look like
column_1 | column_2
---------------------
Atlanta | Atlanta
Boston | Chicago
Chicago | Los Angeles
Seattle | Tacoma
NULL | Seattle
What query could I run that would look at both of these columns, and despite their order, return where the two columns matchup?
The result I am looking for would be:
column_1 | column_2
---------------------
Atlanta | Atlanta
Chicago | Chicago
Seattle | Seattle
I have tried:
SELECT *
FROM cities
WHERE column_1 = column_2;
But this only returns the EXACT matches:
column_1 | column_2
---------------------
Atlanta | Atlanta