| Author |
Counting number of rows returned by select
|
Kim Kantola
Ranch Hand
Joined: May 17, 2001
Posts: 274
|
|
Hi Yall, I am performing a select distinct sql statement in order to get a number of products from a table, I am not really interested in the product names themselves though, but am interested in how many of them there are, for example, if I have a table with rows like this: And my sql is this: I get returned the rows: [B]Apple Orange Bannana[B] But what I am interested in is the fact that there are three of them. Can I add something to the sql to have it return the number of rows returned (3) or do I have to iterate over the result set to find the number? Thanks a bunch for any info, Kim
|
 |
nilesh Katakkar
Ranch Hand
Joined: Oct 27, 2004
Posts: 35
|
|
|
Select count(distinct FruitName) from PRODUCE
|
nilesh<br />neilindallas@hotmail.com
|
 |
Kim Kantola
Ranch Hand
Joined: May 17, 2001
Posts: 274
|
|
thanks !
|
 |
 |
|
|
subject: Counting number of rows returned by select
|
|
|