Re: Select from lastrow

From: Date: Mon, 21 Apr 2003 08:30:14 +0000
Subject: Re: Select from lastrow
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-27209@lists.php.net to get a copy of this message
You can get first n rows by using "rownum" pseudocolumn. Select * from (select * from table_name order by field_name ) where rownum <= n if you want to get fields having bigger values change the order by clause like that "order by field_name desc" HTH Mustafa OCAK PHP Developer Ankara, Turkey ----- Original Message ----- From: "Hendri" <c4c3m@myrealbox.com> To: <php-db@lists.php.net> Sent: Monday, April 21, 2003 11:08 AM Subject: [PHP-DB] Select from lastrow > Hi, DB-Developers. > I want to ask something about SELECT Query on Oracle. > how can i get sorted row from the table (in MySQL, LIMIT ) > and how does if i wanted the lastrow or the firstrow. > > Thanks > -- > Hendri 'cacem' > Hobbyst Programmer > , > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#27209) next »