When joining two tables and they each have the same column name "id", the result will include data for both "id" columns in both tables.
I would like the select statement to produce the list of columns with the table name prefixed:
report.id, report.status, status.id, status.name
yes, possible, but not with the dots, rather, using column alias names
SELECT customers.id <font color='"#0000FF"'>AS cust_id</font>
, orders.id <font color='"#0000FF"'>AS order_id</font>
ON orders.customer_id = customers.id
What if I want this generically, meaning, I want to get all columns like that.
Can I use the wild card '*'?
no, that wouldn't allow you to assign aliases, you have to write them all out
This topic is now archived. It is frozen and cannot be changed in any way.