Re: COUNT(*) with UNIQUE keyword
Posted in 1996
Hi,
u wrote :--
__________________________________________________________
if I have this kind of table
cartype
MERC
FORD
MERC
MERC
MERC
FORD
select COUNT(*) = 6
select UNIQUE cartype = MERC
FORD
how would I count howmany cartype(S) that I have ...... (i.e. 2)
in 1 select statement...????
__________________________________________________________
Use the following query to obtain your result
SELECT COUNT(DISTINCT cartype) from table
____________
Sanjay Kumar Email: skumar@raileurope.com
Rail Europe Inc.
226 Westchester Ave | Office : (914) 681 3296
White Plains, NY 10604 | Fax : (914) 682 5236
---- The world is coming to an end ; please save your files -----