Thread

  1. Re: [HACKERS] Subselects and NOTs

    Zeugswetter Andreas IZ5 <andreas.zeugswetter@telecom.at> — 1998-02-18T17:32:40Z

    This is what I did:
    	create table a (a int, a1 char(8));
    	create table b (b int);
    	insert into a values (1, 'one');
    	insert into a values (NULL, 'null');
    
    and this is what I got from Informix:
    > select * from a where a not in (select * from b);
              a a1
              1 one
                null
    2 row(s) retrieved.
    >  select * from a where not (a in (select * from b));
              a a1
              1 one
                null
    2 row(s) retrieved.
    > select * from a where not a in (select * from b);
              a a1
              1 one
                null
    2 row(s) retrieved.
    > select * from a where a<>(select * from b);
              a a1
    No rows found.
    > select * from a where a=(select * from b);
              a a1
    No rows found.
    
    Andreas