akosch akosch - 2 months ago 34
SQL Question

How can I rename a single column in a table at select?

I have two tables with one identical column name, but different data. I want to join the tables, but access both columns (row["price"], row["other_price"]): How can I rename/alias one of them in the select statement? (I do not want to rename them in the DB)


select table1.price, table2.price as other_price .....