MySQL Forums
Forum List  »  InnoDB

Double COUNT ?
Posted by: Cohen Ben
Date: February 23, 2008 02:09PM

Hello everybody !

First at all, I'm sorry, but I'm French and I don't speak english very well...

So, I Have this table (book_ref):
ID AUTHOR BOOK
1 1 2
2 1 5
3 1 7
4 2 9
I would like to know How many different autor exists...

I tried : "SELECT COUNT(1) FROM `book_ref` GROUP BY AUTHOR"
But, I'd 4 and not 2 ... (there are only 2 different authors).

So, How I can be to have 2 ?

Thank you very much for your listening.

Options: ReplyQuote


Subject
Views
Written By
Posted
Double COUNT ?
2940
February 23, 2008 02:09PM
1977
February 24, 2008 03:30PM
1870
February 25, 2008 02:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.