Reputation: 15
I'm trying to show the informacion I have in the tables "caractersiticas" and "Control" without including "codigoMaterial" which is related to "codigo".
I have tried this:
SELECT *
FROM caracteristicas
JOIN control
ON codigo = codigoMaterial
I get all the results from both table and I don't want it to show one entire column. What shoud I do?
Upvotes: 0
Views: 50
Reputation: 704
SELECT *
means show all the columns. Otherwise, you'll need to specify the columns you do want to show. You can also alias your tables to make reading easier:
SELECT car.Field1, car.Field2, cont.FieldA, cont.FieldB
FROM caracteristicas car
JOIN control cont
ON car.codigo = cont.codigoMaterial
Upvotes: 1