How do i caculate all the numbers under a column and display it in lable
for example
column 1
1
display total
lable = 4
You will get by using SUM() function.
SELECT SUM(column 1) AS Total From tableName
Then show the result to label.
micah says: SELECT SUM(LikeCount) AS Total From Likes u WHERE u.UserName=@UserName
SELECT SUM(LikeCount) AS Total From Likes u WHERE u.UserName=@UserName
SELECT
SUM
(LikeCount)
AS
Total
From
Likes u
WHERE
u.UserName=@UserName
Chenge with the below.
SELECT SUM(LikeCount) AS LikeCount From Likes u WHERE u.UserName = @UserName
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.