Databases Querying Relational Databases Joining Table Data with SQL Inner Joins

Inner Join

select mk.MakeName, mk.ModelName from make as mk inner join Model as md on mk.MakeId = md.MakeId where mk.MakeName = "Chevy";

but it says No such Column ; Modelname

1 Answer

Steven Parker
Steven Parker
185,909 Points

The ModelName comes from the Model table, but you're using the table alias for the Make table to reference it.

So instead of "mk.ModelName", use "md.ModelName".