devxlogo

Number of Records Returned By a Query

Number of Records Returned By a Query

Question:
How can I get the number of records returned by a query without cycling through all the records and counting each one?

Answer:
Have you tried SELECT COUNT(*) FROM MyTable ? Alternatively, I think the number of rows is stored in sysxindexes.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist