I have 2 tables, Property and PropertyImage. 1 Property has multiple images
I need to get all the properties and just 1 PropertyImage per Property.
Does anyone know how to accomplish that?
Property: PropertyID, Name
PropertyImage: PropertyImageID, PropertyID, Source, Type
Thanks
Here is an example where all the records from Property is selected and the last record from PropertyImage, assuming that the id column is an identity column and the last record is the one you need. You will need to adjust based on your exact column names and requirements.
EDIT: Added column names in select