SELECT COUNT(DISTINCT ID) FROM my_table;
Note: NULL values will be omitted from the count.
regards,
thalis
p.s. would be a good idea to read an SQL tutorial before your next post
On Thu, 29 Mar 2001 [EMAIL PROTECTED] wrote:
>
> Hi, I am trying to count all the distinct id numbers in a colu
tly 100% Slogan Free"
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 7:32 PM
Subject: Counting distinct rows
>
> Hi, I am trying to count all the distinct id numbers in a column but I
> just can't figure it ou
At 8:32 AM +0800 3/29/01, <[EMAIL PROTECTED]> wrote:
>Hi, I am trying to count all the distinct id numbers in a column but I
>just can't figure it out... What would be the appropriate select statement
>for this, thanks,
SELECT COUNT(DISTINCT id) FROM tbl_name
--
Paul DuBois, [EMAIL PROTECTED]
Hi, I am trying to count all the distinct id numbers in a column but I
just can't figure it out... What would be the appropriate select statement
for this, thanks,
-
Before posting, please check:
http://www.mysql.com/manual