Databases Querying Relational Databases Joining Table Data with SQL JOIN Queries

Richard Külling
Richard Külling
9,464 Points

How does this query not give the correct results?

SELECT Make.MakeName, Model.ModelName, Car.VIN, Car.StickerPrice FROM Model INNER JOIN Make ON Model.ModelID = Model.MakeID INNER JOIN Car ON Car.CarID = Car.ModelID;

1 Answer

You should be joining fields that are the same i.e. ModelID = ModelID, CarID = CarID, etc etc