Counting unique records

Results 1 to 3 of 3

Thread: Counting unique records

  1. #1
    Paul Merton Guest

    Default Counting unique records

    Hi,<BR><BR>How would I count the number of unique records in a database table?<BR><BR>I can do...<BR>SELECT COUNT(*) as count FROM table<BR>...and...<BR>SELECT DISTINCT * FROM table<BR><BR>...but cannot seem to work out how to combine them together to produce the number of unique lines.<BR><BR>Cheers for any help,<BR>Paul.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Counting unique records

    Try using this...<BR><BR>SELECT COUNT(DISTINCT field_name) As Something FROM table_name<BR><BR>Happy Programming

  3. #3
    Paul Merton Guest

    Default RE: Counting unique records

    Thanking you kindly for the prompt reply!<BR>Although I&#039m not in the position to test what you&#039ve suggested for another 3 weeks! (still, it looks like it should work!)<BR><BR>Cheers!<BR>Paul.<BR><BR>paul_merton@

Posting Permissions

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