count query
how to store the count query result in a variable?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AnkurPosted Jan 28, 2013, 5:26 AM
assuming your query is about SQL query(if not please let me know):
declare @Count int = 0
set @Count = (Select COUNT(ColumnName) from TableName)
print @Count
Hope that helps.
Thanks..