I\'m wondering if this is possible in SQL. Say you have two tables A and B, and you do a select on table A and join on table B:
SELECT a.*, b.* FROM TABLE_A a
I solved a similar problem of mine by renaming the fields in the tables involved. Yes, I had the privilege of doing this and understand that everybody may not have it. I added prefix to each field within a table representing the table name. Thus the SQL posted by OP would remain unchanged -
SELECT a.*, b.* FROM TABLE_A a JOIN TABLE_B b USING (some_id);
and still give the expected results - ease of identifying which table the output fields belongs to.