adding a column

Codes here !

Moderators: egami, macek, gesf

Post Reply
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: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Fri Feb 07, 2003 2:53 am

SELECT sum(score) FROM table WHERE playerID=4

beefsack

Sun Feb 09, 2003 2:57 pm

thanks a ton :D thats perfect

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests