高手请帮忙看句sql,为什么order by 不起作用select sname from station
where sid in
(
select sid from relationinfo
where tid =
(
select tid from traininfo
where tname='abc'
)
order by sequence
);
where sid in
(
select sid from relationinfo
where tid =
(
select tid from traininfo
where tname='abc'
)
order by sequence
);
在
order by sequence 里面 有什么意义?? 没用啊
在where sid in 里面 有什么意义?? 没用啊
where station.sid=relationinfo.sid and
relationinfo.tid=raininfo.tid and
traininfo.tname='abc'order by sequence
如果这个不对的话,最重要的我是想说,order by 后的要在select要有,才可以排序。
where station.sid=relationinfo.sid and
relationinfo.tid=raininfo.tid and
traininfo.tname='abc' order by sequence
如果这个不对的话,最重要的我是想说,order by 后的要在select要有,才可以排序。