select Distinct
    _Ad.ad_id, _Ad.Ad_Name,
    ID.Image_Path, VM.year,
    VD.Vehicle_Transformation, VD.Vehicle_Fuel_Type, VD.Vehicle_Mileage
from
    _Ad
order by
    Ad_Date_Created
inner join
    _Image_Details ID on ID.ad_id = _Ad.ad_id
inner join
    _Vehicle_Model VM on VM.vehicle_model_id = _AD.vehicle_model_id
inner join
    _Vehicle_Details VD on _ad.ad_id = VD.ad_id;


我不断收到一个错误,即无法绑定多部分数据。请帮助纠正查询

最佳答案

尝试这个:

select Distinct
    _Ad.ad_id, _Ad.Ad_Name,
    ID.Image_Path, VM.year,
    VD.Vehicle_Transformation, VD.Vehicle_Fuel_Type, VD.Vehicle_Mileage
from
    _Ad
inner join
    _Image_Details ID on ID.ad_id = _Ad.ad_id
inner join
    _Vehicle_Model VM on VM.vehicle_model_id = _AD.vehicle_model_id
inner join
    _Vehicle_Details VD on _ad.ad_id = VD.ad_id;
order by
    Ad_Date_Created

10-01 21:18