Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
This seems like a simple problem, but I have been unable to find an answer.
We need to create a join of two tables that have a common key, but need all fields in the tables. We would like to do a SELECT * FROM TableA, TableB where tableA.commonkey=tableB.commonkey. There are many fields in both tables. The commonkey shows up twice with extensions of _a and _b respectively. Is there a generic way to get the commonkey to appear once with its own name?
I have tried to state my question simply. The actual problem is much more complicated. The select is built from an interactive query builder and we do not want to explicitly name each of the fields. We do need the common fields to have the same name as the original field in the resultant table. The two tables are not completely normalized and there is more than one field that creates this problem.
Thanks in advance for your assistance.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement