MYSQL SUM SEVERAL COLUMN VALUES
-
I have mysql table which stores students marks. The first column represent the unique Regno For each student, the second reprsents TotalScore and the rest of the rows represent units name. Note...The columns representing different can be increased if a new unit is added. Therefore i wish to know how i can loop through the records of each student ,add them and insert into TotalScore column...am still new to vb.net. Kindly assist the table is as follows: REGNO TOTALSCORE UNIT1,unit2,unit3,unit4,...UNITn 1 2 3 . . n
-
I have mysql table which stores students marks. The first column represent the unique Regno For each student, the second reprsents TotalScore and the rest of the rows represent units name. Note...The columns representing different can be increased if a new unit is added. Therefore i wish to know how i can loop through the records of each student ,add them and insert into TotalScore column...am still new to vb.net. Kindly assist the table is as follows: REGNO TOTALSCORE UNIT1,unit2,unit3,unit4,...UNITn 1 2 3 . . n
KipkoechE wrote:
i wish to know how i can loop through the records of each student and insert into TotalScore column
What do you want to insert into the TotalScore column?
The difficult we do right away... ...the impossible takes slightly longer.
-
KipkoechE wrote:
i wish to know how i can loop through the records of each student and insert into TotalScore column
What do you want to insert into the TotalScore column?
The difficult we do right away... ...the impossible takes slightly longer.
-
How about executing the query:
UPDATE tablename SET TotalScore = (unit1 + unit2 + unit3 + unit4) // and so on?
The difficult we do right away... ...the impossible takes slightly longer.
-
How about executing the query:
UPDATE tablename SET TotalScore = (unit1 + unit2 + unit3 + unit4) // and so on?
The difficult we do right away... ...the impossible takes slightly longer.
-
KipkoechE wrote:
the number of columns can be changed at runtime
How is that possible? Are you creating a new table with a different number of columns and then deleting the first table?
The difficult we do right away... ...the impossible takes slightly longer.
-
KipkoechE wrote:
the number of columns can be changed at runtime
How is that possible? Are you creating a new table with a different number of columns and then deleting the first table?
The difficult we do right away... ...the impossible takes slightly longer.