Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Posts
    1

    Question Unanswered: how to know the repetition of the name in a table column.. -need help-

    Hello All.....

    i have a table .. with 2 column "ID", "Name"

    ID is Primary Key,

    Name is repeatable, (same name in many rows)

    ------------------------------------------------------------

    i want to select distinct from the table .... but with new column telling me how much the name repeated


    Simple and noop qu. , i know

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    SELECT name
         , COUNT(*) AS rows
      FROM daTable
    GROUP
        BY name
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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