Subject | Generic SQL question |
---|---|
Author | Kjell Rilbe |
Post date | 2005-05-16T12:07:51Z |
Hi,
Just have to make sure I'm not going crazy. Please confirm that these
two SQL statements should return the same result:
select count(*)
from F
where not exists (
select 1
from T
where T.ID = F.ID
)
select count(*)
from F
where ID not in (
select ID
from T
)
Thanks,
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
Just have to make sure I'm not going crazy. Please confirm that these
two SQL statements should return the same result:
select count(*)
from F
where not exists (
select 1
from T
where T.ID = F.ID
)
select count(*)
from F
where ID not in (
select ID
from T
)
Thanks,
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64