Joe,
Indeed you are correct its a correlated subquery!
Thanks again.
Ken
Joe Wilson <[EMAIL PROTECTED]> wrote: --- Ken wrote:
> Is this an error or by design?
> create table ss( ssid, ss_value);
> create table s(id, s_value);
...
> select id from s where id in ( select id from ss);
(In the 5 hour lag it takes to post to the list, this has
probably already been answered 5 times, but what the heck...)
You've written a correlated subquery:
select id from s where id in (select s.id from ss);
>
> returns
> 1
> 2
> 3
>
> Shouldn't the subselect fail since the id is not in the SS table ?
>
> select s.id from s where s.id in ( select ss.id from ss );
> returns: SQL error: no such column: ss.id
____________________________________________________________________________________
Shape Yahoo! in your own image. Join our Network Research Panel today!
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------