日期:2014-05-17 浏览次数:20465 次
select a.*,c1.cityname as 出发城市,c2.cityname as 到达城市 from air a left join city c1 on c1.id = a.fromCityId left join city c2 on c2.id = a.toCityID
------解决方案--------------------
SELECT A.id, C1.cityName fromCityName, C2.cityName toCityName, A.price, A.dateTimes FROM Air A JOIN City C1 ON A.fromCityId=C1.id JOIN City C2 ON A.toCityId=C2.id