I don't have an awful lot of experience with SQL, and I've managed to get stuck at the first semi-advanced hurdle
I've got a cars table and a makes table. The makes table contains 2 columns, make_id and make, make_id being an auto incremented primary key and make being the make name. The cars table contains loads of details about loads of cars, and uses the column make_id, which refers to the make in the makes table.
I want to fetch all the data from the cars table, but I want it to pull the actual make instead of the make_id. I don't even think I need a join, maybe it's easier.
I've thought about trying this but I think it will be way off:
Code: Select all
SELECT car_id, make, model, description, price FROM cars, makes WHERE cars.make_id = makes.make_idWhat is the correct SELECT query to use?
Thanks.