Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RecCount() equivalent in SQL-Server
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00181733
Message ID:
00181805
Views:
11
>I am creating some cursors on a SQL-Server

Are you creating server-side cursors, temporary tables, or permanent tables?

>Is there some stored procedure that will just return this number from some system table??? It takes quite a while especially on tables of 500,000 or more records

SQL Server has the @@ROWCOUNT global variable. The variable is scoped to the connection and is affected by every statement set to the server. You might find it unreliable.

Creating a non-clustered index on the table will improve the speed of the SELECT COUNT(*).
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform