0

I am joining two tables house and tower, both have some of the same column names such as id, created_at, deleted, address etc. I wonder if it is possible to return the columns in the following fashion: house.created_at, house.id, tower.created_at, tower.id etc. I know I can query with AS, I was wondering if it is possible to query something like this: SELECT house.* AS house, tower.* AS tower. I tried it like this, but it was not valid SQL. Any idea how I can chase the column names prefix easily ?

a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843
jjuser19jj
  • 1,463
  • 3
  • 18
  • 37

0 Answers0