station表 列名: stationId 站點編號 stationlon 站點經度 stationlat 站點緯度 record表 列名: recorkId 記錄編號 stationGoId 借出站點編號 stationBackId 歸還站點編號 查詢結果顯示列: stationGoId 借出站 ...
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查詢結果: