表a:id    始发站id   终点站id
表b:站点id    站点中文怎么实现展示: a.id     始发站中文     终点站中文

解决方案 »

  1.   

    select a.id,b1.站点中文 as 始发站中文,b2.站点中文 as 终点站中文
    from 表a as a,表b as b1,表b as b2
    where a.始发站id=b1.站点id and a.终点站id=b2.站点id
      

  2.   

    select 表A.ID,(select 站点中文 from 表B where 站点ID=表A.始发站id) as 始发站中文,
    (select 站点中文 from 表B where 站点ID=表A.终点站id ) as 终点站中文, from 表A