Re: limit for MSSQL
| From: | Adam Voigt | Date: | Tue, 08 Apr 2003 12:46:23 +0000 |
| Subject: | Re: limit for MSSQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142850@lists.php.net to get a copy of this message | ||
A workaround:
SELECT TOP 30 FROM table WHERE id >= 20;
That will get you 20-50.
MSSQL doesn't natively support limit the same way MySQL does.
On Tue, 2003-04-08 at 04:52, Foong wrote:
> Hello,
> The following SQL does not work in MSSQL:
>
> select * from table limit 20, 50
>
> The TOP # in MSSQL doesn't alow me specify which starting record to
> retrieve, only how many record to retrieve..
>
> Anyone has solve this kind of problem before?
>
> Foong
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
Adam Voigt (adam@cryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc