标签:
station表
列名:
stationId-----站点编号
stationlon----站点经度
stationlat----站点纬度
record表
列名:
recorkId---------记录编号
stationGoId------借出站点编号
stationBackId----归还站点编号
查询结果显示列:
stationGoId-----借出站点编号
GoStationlon----借出站点经度
GoStationlat----借出站点纬度
stationBackId---归还站点编号
BackStationlon--归还站点经度
BackStationlat---归还站点纬度
1 select r.stationGoId,s1.stationlon as GoStationlon,s1.stationlat as GoStationlat, 2 r.stationBackId,s2.stationlon as BackStationlon,s2.stationlat as BackStationlat 3 from record as r,station as s1,station as s2 4 where r.stationGoId = s1.stationId and r.stationBackId = s2.stationId
sql查询结果:
标签:
原文地址:http://www.cnblogs.com/landiljy/p/5396672.html