Click here to Skip to main content
14,733,542 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what is the query that is used to count the number of rows of a table in a data base
Updated 27-Oct-12 9:35am
jackfrnz 27-Oct-12 14:31pm
what do you mean by "base table data" ?

count the number of rows of a table

Refer: MSDN: COUNT (Transact-SQL)[^]
Mounayangui 27-Oct-12 14:55pm
i want to affect the number of the row in an integer variable
Sandeep Mewara 27-Oct-12 14:59pm
1. You comment is 'Not clear'.
2. Your question just asks for a query to find count.
adriancs 27-Oct-12 21:47pm
Yes, this query will return an integer.
adriancs 27-Oct-12 21:46pm
shot at target. vote 5
SELECT COUNT(*) into nbr FROM myTable

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900