Posted By: vejpuste (Libor Vejpustek) on 'CZdatabases'
Title: Re: zajimavost
Date: Thu Sep 5 00:26:46 2002
> SELECT COUNT(DISTINCT b.id) FROM a,b WHERE a.id = b.id
> a to vrati 2 :-) Je to Informix specific, nebo to funguje i jinde?
Tohle by melo fungovat obecne. Ale jde to treba taky napsat jinak :
select count(*) from b where exists (select 'X' from a where a.id=b.id);
Libor Vejpustek
Ceska zemedelska univerzita Praha
http://web.czu.cz/~vejpuste/ E-mail : vejpuste@uvt.czu.cz