mardi 4 août 2015

Return a column once time

I execute a query in my DB:

SELECT table1.*, tabl2.* FROM table1 JOIN table2 USING(id);

In these 2 tables i have a common column "id". What I have to ask, in order to get the column 'id' once time in the results and not twice?
I thought one solution is to write down in the query which columns I want. But If I want to avoid this (as there are many) ?

Aucun commentaire:

Enregistrer un commentaire