Ok, for a moment, throw out of your mind "good database design". Let's say I have two tables, and they have some of the same columns.
item
-------
id
title
color
and
item_detail
-------
id
weight
color
In a good normal query, you'd choose the columns you want within the query, like so:
SELECT item.title, item_detail.color, item_detail.weight ...
But what if you are stuck with a query that was built with star/all:
SELECT * ...
In this case you would get two color
columns pulled back in your results, one for each table. Is there a way in MySQL to chose one color
column over the other, so only one shows up in the results, without a full rewrite of the statement? So that I could say that the table item_detail
takes priority?
Probably not but I thought I'd ask.