This question already has an answer here:
I'm using a left outer join in a query. but now I'm getting a double id, What I mean is that I now get the id of table 1 and the id of table2 both called id.
Is there a way to maybe rename(prefix) the id of table 2 with something like table2_id? without having to use 'AS table_nameOfColumn' for every column of table 2
My current query:
SELECT invoices.*, clients.* FROM invoices
LEFT OUTER JOIN users ON invoices.employee_id = users.id
LEFT OUTER JOIN clients ON users.client_id = clients.id
WHERE invoices.employee_id = 3
</div>