hi ,

M facing the problem to get first 4 rows from the table .
m using sql2000. i used count but it is showing total no of rows in a table .
please let me know the query used to display rowcount.

The only way to get the exact row count of the number of rows returned by a query is to count them as they are retrieved. Before starting to retrieve rows the db server knows whether or not there are more than zero rows, but doesn't know exactly how many until they have all been retrieved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.