View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 07:53 AM
Paul
 
Posts: n/a
Default Re: find null value in any column


wilson.sh.tam@gmail.com wrote:



> Assume I have a table with only 1 row and all column is 'int'. 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?


> For example,


> create t1 ( i1 int null, i2 int null ....)
> insert into t1 (i1, i2, ...) values (1, 1, 1, ... , null, 1, ... null,
> ..)


> and check if any of those column contain null...



Select from t1 where i1 is null or i2 is null or ....... in is null



Paul...





> Have fun,
> Willie


--

plinehan __at__ yahoo __dot__ __com__

XP Pro, SP 2,

Oracle, 9.2.0.1.0 (Enterprise Ed.)
Interbase 6.0.1.0;

When asking database related questions, please give other posters
some clues, like operating system, version of db being used and DDL.
The exact text and/or number of error messages is useful (!= "it didn't work!").
Thanks.

Furthermore, as a courtesy to those who spend
time analysing and attempting to help, please
do not top post.
Reply With Quote