If you really don't want this duplication of columns (i.e. getting id and youth_id) from
SELECT *, prof.id AS youth_id FROM time INNER JOIN profiles prof ON time.profile_id = prof.id WHERE foo = 'bar'
You can SELECT * from each table, except for the table with the column that you want to add to the alias:
SELECT time.*, prof.id AS youth_id, prof.forename, prof.surname FROM time INNER JOIN profiles prof ON time.profile_id = prof.id WHERE foo = 'bar'
This will give you all the columns from time to time and listed from profiles. You still have to list all the columns in the table in which you are looking for the column alias, but at least you do not need to list each of them.
Of course, there is also an argument that you should list all the columns anyway if your layout changes at some point, but this is another story.
source share