Re: Help:about rownum

From: petersyang <peter_at_aps.com.cn>
Date: Fri, 13 Oct 2000 21:32:45 +0800
Message-ID: <8s72po$cf1$1_at_news.cz.js.cn>


Sorry ,basis on your suggest,the result still fault!

but I can get the right result ,following: select * from (select a,b,c,from table1,table2,table3 where table1.a1=table2.b1
> and table3=table1.c1 group by a,b,c) where rownum < 4;
So ,in the sub table you can't use order by! Thank you
TurkBear <johng_at_mm.com> wrote in message news:39e72ced.13945382_at_news.news-ituk.to...
>
> As long as you are cross-posting, try searching deja...this is one of the
 most
> often asked questions...order by happens after the 3 rows are retrieved;
 the 3
> rows are in no particular order...
>
> Try instead
>
> select * from (select a,b,c,from table1,table2,table3 where
 table1.a1=table2.b1
> and table3=table1.c1order by a) where rownum < 4;
>
>
>
> Õã½­ <peter_at_aps.com.cn> wrote:
>
> >Help me:
> >When I use rownum:
> >example:
> >select a,b,c
> >from table1,table2,table3
> >where table1.a1=table2.b1 and table3=table1.c1
> >order by a
> >
> >result:
> >a b c
> >1 ad ds
> >2 ds sd
> >21 sad dd
> >3 lds kd
> >4 sd sddf
> >
> >now :use rownum
> >select a,b,c
> >from table1,table2,table3
> >where table1.a1=table2.b1 and table3=table1.c1
> >and rownum<4 order by a
> >result:
> >a b c
> >1 ad ds
> >2 ds sd
> >4 sd sddf
> >Why???????? how can I get the correct result?
>
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Received on Fri Oct 13 2000 - 15:32:45 CEST

Original text of this message