I have two different table. One table has 70 Columes, the other has 80. I want to display all the Columes of the two tables. But there are some Columes with the same Columes-name.
EX:
SELECT *
FROM TABLE1 A INNER JOIN
TABLE2 B ON A.ID = B.ID
I want to distinguish which table does the Columes comes from.
I know have to list your column list explicitly and provide aliases to them in the SELECT list.
How can I modify my program?
Is there any other easier way.
Because there are too many field names
You can build a query and let it to compose the query for you. It's not that hard as it seems
I've created tables TEST1 and TEST2 with identical column names and managed database to list me all the columns with prefixes.
The output is
So you may run the query, copy the output and then add the FROM and WHERE and other parts you need