I am going through all the columns of a row’s table’s columns (that was a tricky way of saying it – basically I have a row “R”, where I use R.Table.Columns to iterate through them).
For each column, I would like to know which table it belongs to.
However, with the following query, only 1 table appears in the resultset. How come? I need to distinguish between the different tables, even if the column names are the same.
SELECT * FROM User LEFT OUTER JOIN Provider ON User.ProviderID=Provider.ID WHERE User.IsDeleted=false
Use aliases:
Using SELECT * is bad practice anyway: SELECT * is evil