Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to remove NULL from the return select?

Author  Topic 

sqlontherun101
Starting Member

16 Posts

Posted - 2009-10-10 : 00:53:25

Hi,
In the following query i've tried to display Color gategories and how many time it was added to Product table

SELECT Color, COUNT(Color) FROM SalesLT.Product
GROUP BY Color

The result came as follows:
NULL 0
Black 89
Blue 26
Grey 1
Multi 8
Red 38
Silver 36
Silver/Black 7
White 4
Yellow 36

I need to remove the NULL value at teh top of the list, how do i do this?

TY in advance

Kabila
Starting Member

33 Posts

Posted - 2009-10-10 : 01:03:54
SELECT Color, COUNT(Color) FROM SalesLT.Product where color is not null
GROUP BY Color
Go to Top of Page
   

- Advertisement -