Use TABLESAMPLE
Example.
SELECT FirstName, LastName
FROM Person.Contact
TABLESAMPLE (10 PERCENT) ;
OR
SELECT FirstName, LastName
FROM Person.Contact
TABLESAMPLE (10 ROWS) ;
Use TABLESAMPLE
Example.
SELECT FirstName, LastName
FROM Person.Contact
TABLESAMPLE (10 PERCENT) ;
OR
SELECT FirstName, LastName
FROM Person.Contact
TABLESAMPLE (10 ROWS) ;
Quote:
Originally Posted by pritisarode
Hi,
I m doing slideshow application. fro that i m using Ms Sql 7.0 server.
Now i want to retrieve each time 10 different records order by date
(it is the column) from table out of 100 records.
Plz, help me for writing the sql query for this.