Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get the total number of rows
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00643239
Message ID:
00643252
Views:
8
This message has been marked as a message which has helped to the initial question of the thread.
>Is there a way to get the total number of rows without doing a select *.
>
>I am do a import/export routine and want to make sure the table I am importing into does not have any existing data. Since I am walking down an array filled from SQLTABLE(gnConn), I don't know what the field names are to select just one field to count, and a count(*) would seem to be overkill.
>
>Thanks in advance
>
>Kirk

If your table is empty than SELECT COUNT(*) wouldn't take any time. The only difference's between SELECT COUNT(*) and SELECT COUNT(somefield) that the second dosn't count records with Nulls in Somefield.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform