Limiting the number of records in SELECT 
Author Message
 Limiting the number of records in SELECT
I know this was discussed, but I wasn't paying attention...

How do you limit the amount of records returned in a SELECT
statement? My select is returning over 300 hits, but I only
want the first 10.

Thanks.
sim.



Sat, 05 Sep 1998 03:00:00 GMT
 Limiting the number of records in SELECT

Quote:

>I know this was discussed, but I wasn't paying attention...
>How do you limit the amount of records returned in a SELECT
>statement? My select is returning over 300 hits, but I only
>want the first 10.
>Thanks.
>sim.

Use SET ROWCOUNT, as in

SET ROWCOUNT 10

SELECT * FROM Mytable

SET ROWCOUNT 0  /* back to no limits */

        Vince Iacoboni



Thu, 10 Sep 1998 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. How can I limit the number of records selected with SELECT - SQL in FPW

2. Limiting number of records returned by the SELECT statement

3. Selecting only a limited number of records with SQL

4. select the top number records where the qty would sum to a given number

5. HELP: Selecting a Specific number of Records from Record Set

6. HELP: Selecting a Specific number of Records from Record Set

7. SELECT TOP with additional requirement: (limited number per group)

8. Limit Number of Recordset Return from SELECT statement

9. Returning a limited number of rows from a SELECT statement

10. Limit Number of Recordset Return from SELECT statement

11. How to limit the number of rows returned by SELECT

12. Limit the Number of Rows Returned by Select ?


 
Powered by phpBB® Forum Software