DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: count

  1. #1
    Join Date
    Jul 2000
    Posts
    68
    Hi, all

    Now I have a table called XXX. There a two columns A and B. I need the number of rows in which A and B combining together is unique.

    I tried this:

    SELECT COUNT(DISTINCT(A, B)) FROM XXX;

    But i got a error.

    How could I get the result?

    Thanks in advance.

    Alice

  2. #2
    Join Date
    Mar 2001
    Posts
    1
    Try this...

    SELECT COUNT(DISTINCT A||B) FROM TABLE;

  3. #3
    Join Date
    Jul 2000
    Posts
    68
    Thanks very much. It is perfect.

    Have a good day!

Posting Permissions

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


Click Here to Expand Forum to Full Width