Subject | Re: [ib-support] Re: DEAD LOCK ON SQL |
---|---|
Author | Svein Erling Tysvær |
Post date | 2002-06-12T14:25:34Z |
>The logic of this is not the same as the correlated subselect:Yes, it is (at least if written correctly).
>
>select...where mine.col1 in (select yours.colx from yours where something
>of mine matches something of yours)
I tried something like
SELECT NAME
FROM ib-support ib
WHERE EXISTS(SELECT 1
FROM ibobjects ibo
WHERE ib.surname = ibo.surname
AND ibo.signature = 'heLen')
and the only row that was returned was "Helen Borrie", not all the names in
ib-support (OK, so I did it on some data containing cancers and hospitals,
but Norwegian column names doesn't make sense to most of you so I
"translated" it). The exists is executed once for every potential row to
return - at least when there is a link in the where clause of the subselect.
>nor is the same as the join statement:Just included this to say that I completely agree with you regarding this
>
>select...
>from mine join yours
> on mine.col1 = yours.colx
statement! ;o}
Set
-a little puppy fighting the big (kan)guru