Problem in dbaccess (Informix 7.2)
Posted in 1997
Tomek Frydryk — — source: Informix-list mailing list archive (1991-1998)
Little problem. We have 2 tables A and B. In table A we have column numer (SERIAL type). In B we have column A_id. which is a key to A.numer (is this clear?). In table A we have 80000 records, in B 20000 records. And now we're making 3 selects: 1) select count(*) from A; Answer: 80000. 2)select count(*) from A where numer in (select A_id from B); Answer: 20000. 3)select count(*) from A where numer not in (select A_id from B); Answer: 0 Question: the 3rd select must return 60000, or not? Why there is zero? What is the tip? Tomek Frydryk Bank Staropolski S.A.