View Single Post

   
  #9 (permalink)  
Old 02-28-2008, 08:56 AM
Peter H. Coffin
 
Posts: n/a
Default Re: find null value in any column

On 18 Jul 2006 09:33:20 -0700, --CELKO-- wrote:
>>> Assume I have a table with only 1 row and all column is INTEGER. I just wonder is it possible to use SQL to check if any one of those column contain a 'null' without knowing the column name? <<

>
> SELECT 'yes'
> FROM Foobar
> WHERE (c1 + c2 + c3+ .. + cn) IS NULL;


Now THAT is clever.

Gold star for you.

--
"The last refuge of the insomniac is a sense of superiority to the
sleeping world."
--Leonard Cohen, The Favourite Game
Reply With Quote