adding a column

Codes here !

Moderators: macek, egami, gesf

Post Reply
beefsack

adding a column

Post by beefsack » Thu Feb 06, 2003 10:58 pm

ok, say i had a db which had a playerID field and a score field. say the playerID isnt a primary key and there is multiple instances of it. if i did "SELECT score FROM table WHERE playerID=4" it might return multiple results. how would i get a total of score instead of multiple results? i hope that made sense :P

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Post by Redcircle » Fri Feb 07, 2003 2:53 am

SELECT sum(score) FROM table WHERE playerID=4

beefsack

Post by beefsack » Sun Feb 09, 2003 2:57 pm

thanks a ton :D thats perfect

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests