I figured it out!
For benefit of all I'm posting the answer:
select top 3 * from table
This query will return the top three rows of the table but now I want to
them to be random.
Once again, in MySQL you could just say "order by rand()" but that doesn't
work in MSSQL. Does anyone know how to do this?
----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 16, 2002 2:54 AM
Subject: Re: [PHP] Is there an MSSQL limit function?
> On Saturday 16 February 2002 17:48, Dean Householder wrote:
> > Is anyone familiar with how exactly to use the TOP command in MSSQL? Is
> > in it's own SQL query or built into the select query? I'm looking at
> > help and it doesn't seem very helpful...
> It's been a while since I last used MS dbs. But I think it goes something
> SELECT * FROM table TOP 5;
> In fact I checked the help of Access and it is detailed there.
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> The primary requisite for any new tax law is for it to exempt enough
> voters to win the next election.
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php