----- Original Message ----- 
From: "Steve Grosz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 08, 2004 3:19 PM
Subject: Not returning NULL or 'N/A' fields?


> Is there a way to have a select NOT return columns that have either a
> 'null' or 'n/a' value?  I have some shared specs for some products, and
> some of the fields aren't used for all products, so I have blank entires
> in those columns for those specific products.  I'd like to return all
> the info that is actually there.
>
In a word, no.

If you specify a column name in your SELECT, that column will be returned in
the result set whether it contains a null or not. I believe that is true of
all relational databases, not just MySQL.

If you are bothered by selling nulls and would like to have them appear as
zeroes or blanks or question marks instead of N/A or whatever, *that* can be
done easily enough: see the COALESCE function at
http://dev.mysql.com/doc/mysql/en/Comparison_Operators.html.

Rhino


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to