Subject | Re: [ib-support] is it possible to.... |
---|---|
Author | Claudio Valderrama C. |
Post date | 2002-02-12T06:40:56Z |
"Bert Neef" <bert@...> wrote in message
news:4.3.2.7.2.20020211211149.03b4f078@localhost...
from A left join B
on A.pk = B.fld
WHERE B.fld is null;
select A.a from A
where not exists(select * from B where B.fld = A.pk);
There's a third way, using the IN operator, but it's the slowest way. There
are at least 3 ways more to do the same.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
news:4.3.2.7.2.20020211211149.03b4f078@localhost...
> return a selection of rows from table A based on wether the value of theselect A.a
> primary key of a row isn't found in a certain column in table B. (or is
> found)? if yes : how?
from A left join B
on A.pk = B.fld
WHERE B.fld is null;
select A.a from A
where not exists(select * from B where B.fld = A.pk);
There's a third way, using the IN operator, but it's the slowest way. There
are at least 3 ways more to do the same.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing