Results 1 to 2 of 2

Thread: Sql help

  1. #1
    Join Date
    Jul 2011
    Posts
    5

    Unanswered: Sql help

    say i have a table with home points and away points columns for 10 teams, is there a command that will let me add the points together for each seperate team, and if possible creat a report from it, cheers

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yes, there is, it's called the addition operator, and it is implemented in mysql by the plus sign
    Code:
    SELECT team
         , home_points + away_points AS total points
      FROM daTable
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •